a4j:include navigation setup
pedalshoe May 29, 2009 7:45 PMWhen I setup a page using a4j:include to navigate 4 view-ids. I put the navigation rules into the coarse grained view.page.xml file and the navigation didn't work. I then commented out the rules in the file and placed them into pages.xml and the navigation worked.
For example:
list.xhtml contained:
<a4j:commandLink value="View" action="view" /> <a4j:commandLink value="Add" action="add" /> <a4j:commandLink value="Edit" action="edit" /> <a4j:commandLink value="Delete" action="delete" />
list.page.xml originally contained:
<?xml version="1.0" encoding="UTF-8"?> <page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd" > <navigation> <rule if-outcome="add"> <render view-id="/add.xhtml"/> </rule> <rule if-outcome="view"> <render view-id="/view.xhtml"/> </rule> <rule if-outcome="edit"> <render view-id="/edit.xhtml"/> </rule> <rule if-outcome="delete"> <render view-id="/delete.xhtml"/> </rule> </navigation> </page>
navigation didn't work. I commented out the navigation in list.page.xml
and included the rules in pages.xml:
<page view-id="list.xhtml" > <navigation> <rule if-outcome="add"> <render view-id="/add.xhtml"/> </rule> <rule if-outcome="view"> <render view-id="/view.xhtml"/> </rule> <rule if-outcome="edit"> <render view-id="/edit.xhtml"/> </rule> <rule if-outcome="delete"> <render view-id="/delete.xhtml"/> </rule> </navigation> </page>
Navigation worked! Please let me know if this is the only way to define
navigation for a4j:include. Or, did I do something wrong?
It would be nice if the navigation can be specified in list.page.xml as well.
Thank you,
Christopher