|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
view not on file-systemHi, I’m designing a web application where view pages are
not on file system, but pages are stored on database and loaded on request. Facelets view handler requires an URL as an input for parsing
the XHTML page. The first and most obvious solution I designed (just in my
mind now) is one where the view is loaded from database, written on file-system
and then the viewId (and the URL) is ready to be processed by Facelets
ViewHandler. What I don’t like of this solution is that the page is
read from database, written on the file-system and then parsed by Facelets. When
the view is read from database, the stream is ready to be parsed by Facelets,
writing it on the file-system is just a waste of time and resources. I suppose that the depicted scenario is not so uncommon,
can you suggest me an elegant solution? Thanks in advance. |
|
|
RE: view not on file-systemWe accomplished something similar by creating a custom FaceletFactory implementation and overriding createFaceletFactory() in our FaceletViewHandler to return our custom factory. We also implemented a custom Facelet Compiler since the default SAXCompiler's doCompile() method loads the XHTML from an input stream based on a URL. Ours loads it from a database based on a logical path.
________________________________________ From: Tasso Claudio [mailto:c.tasso@...] Sent: Monday, July 06, 2009 12:33 AM To: users@... Subject: view not on file-system Hi, I'm designing a web application where view pages are not on file system, but pages are stored on database and loaded on request. Facelets view handler requires an URL as an input for parsing the XHTML page. The first and most obvious solution I designed (just in my mind now) is one where the view is loaded from database, written on file-system and then the viewId (and the URL) is ready to be processed by Facelets ViewHandler. What I don't like of this solution is that the page is read from database, written on the file-system and then parsed by Facelets. When the view is read from database, the stream is ready to be parsed by Facelets, writing it on the file-system is just a waste of time and resources. I suppose that the depicted scenario is not so uncommon, can you suggest me an elegant solution? Thanks in advance. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |