-
1. Re: Entry Point
gavin.king Jun 22, 2007 7:37 PM (in response to texan)A page action is the right way to do it. If you don't want it to be reinvoked on subsequent partial submits, you have two options:
(1) map the page action to a "fake" view id - yes, a page action is allowed to perform navigation and result in a different view id, just like struts! Perhaps thats not clear in the docs.
(2) set a page scope variable in the action, and do<action if="#{empty wasCalledBefore}"/>
I would say that (1) is most elegant. -
2. Re: Entry Point
gavin.king Jun 22, 2007 7:42 PM (in response to texan)pages.xml for a fake view id is like:
<page view-id="/entryPoint.xhtml"> <action execute="#{something.doSomething}"/> <navigation> <render view-id="/displayWelcome.xhtml"/> </navigation> </page>
or something close to that.
There is no /entryPoint.xhtml file. thats just the URL you want to appear in the browser. -
3. Re: Entry Point
texan Jun 22, 2007 8:53 PM (in response to texan)Perfect! As always, thanks so much for answering so many questions!!!
-
4. Re: Entry Point
utiba_davidr Jun 23, 2007 8:57 AM (in response to texan)Hi,
Should the same technique be used to layer xhtml resources like EJB's can be (using the @Install annotation)? If so, how would you have multiple pages.xml files - and would it conflict?
Say I had a real view: "/product/function.xhtml" and I had customised version of it deployed at a particular site called "/site/product/function.xhtml". Could (or rather should) I use this approach:<page view-id="/product/function.xhtml"> <navigation> <render view-id="/site/product/function.xhtml"/> </navigation> </page>
And refer to the view generally as only "/product/function.xhtml", but actually load "/site/product/function.xhtml". Or should I use something like EL at all times and resolve the actual resource via a method call or resource bundle?
What methodology have you used to address this in the past?
Cheers,
David