This content has been marked as final.
Show 1 reply
-
1. Re: Any ideas on how to add an action (pages.xml) to a page included with facelets
kragoth Dec 1, 2010 5:54 PM (in response to dish13)I fail to see how a pages.xml rule will be cleaner then a simple EL expression.
Essentially all you should have is
<ui:include value="#{MyBean.pageToInclude}"/>
Then in MyBean you just have action methods that get executed when certain tabs are selected.
For example.
public class MyBean etc etc .... { public void tabOneClicked() { setPageToInclude("tabOne.xhtml"); } repeat method for all tabs. }
If you are desperate to use pages.xml then pass parameters around that determine the include page. This will work but, I don't think I would call it cleaner.
Then again, you may want to get someone else's opinion. :) The app I'm working on we have tried very hard to not use pages.xml. Our developers can follow the flow of the application purely in the java code. Rather then having to flip back and forth to figure out what each action is going to do based on the rules in pages.xml. :)