I'm building a website for internal management of a research group. The concept behind the website is that anybody can load a data model containing the fields and formats of the information to be contained in a web page. Moreover, I have a collection of views (for managing different data models) and a set of templates (HTML4, HTML5, different-form-factors for mobile/pad devices).
I'm using mongo as database.
The website is URL centric. A user defines a web page and assigns it a URL within the scope of the url space available to the site. Thus, when a request arrives to the website, a view provider assigns a view to the request (and the view has the template hardcoded in the code).
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ply="http://java.sun.com/jsf/composite/pervasive/layout"
template="/WEB-INF/templates/siteconfiguration/datamodelloader.tmpl.jspx">
As shown in the previous example, I have both the views and templates stored in the WEB-INF folder and I would like to have them stored in different collections in the database. I would like to tell JSF where are them or to provide JSF an input stream or byte array containing the template and the view instead of having them in the WEB-INF folder. In such a way, I can edit, delete or update them in a more convenient way.
However, I'm lost. Can you please help me?
Thanks