
September 18th, 2008 by

Lincoln Baxter III
Very Simple
In a JSF Reference Implementation, passing global faces messages between pages doesn’t work. It’s not designed that way “out of the box.” Fortunately there is a way to do this, which will even support redirects between pages, forwards through a RequestDispatcher, and also through standard JSF navigation cases.
There is a 5 minute solution to this problem.

September 9th, 2008 by

Lincoln Baxter III
Tutorial – Step By Step
If you’ve learned to use JSF Facelets to create on-the-fly, simple components using XHTML, then you probably have a whole slew of custom components that need to be copied between various projects, and can be somewhat painful to keep up to date. You may have tried to move them into a jar file, but Facelets can’t find them there (without some help from us.)
UPDATE – 09/15/2010: In JSF2, this process is no longer required. Simply use JSF2 relocatable resources: Any file placed under the /WebApp/resources directory, and any files placed in the jar:/META-INF/resources directories can be served directly using the JSF2 notation:
#{resource['ocpsoft-jsf2-templates/liquid-blue-2col:images/bodybg.jpg']} |
#{resource['ocpsoft-jsf2-templates/liquid-blue-2col:images/bodybg.jpg']}
Which targets the following resource:
[META-INF or WebContent]/resources/ocpsoft-jsf2-templates/liquid-blue-2col/images/bodybg.jpg |
[META-INF or WebContent]/resources/ocpsoft-jsf2-templates/liquid-blue-2col/images/bodybg.jpg