I’m using seam page navigation rules. and did not experience any problem with adding rules which redirect from one page to another.
But since I designed my page views using those redirection simply don’t happen anymore for those pages.
Tried to define the rule to the view that gets included, then to the view that includes the others (which to me was making more sense) but none work.
Is there anything special about page navigation in seam using included view-id ?
main.xhtml:
<h:outputLabel value="Details:"/>`
<a4j:include viewId="contacts.xhtml" id="contactsDetails"/>`
<page view-id="/*" login-required="true">
<navigation>
<rule if="#{myBean.readyToSee}">
<redirect view-id="/see-contat.xhtml"/>
</rule>
</navigation>
</page>
I’m using jsf, xhtml as my page views.
Thanks
Its difficult for me to answer this question because I simply don’t understand it. However I will try to guess what you are asking.
You have a page ie:
/somePage.xhtmland inside that page you include some other pages.I tend to write all my page navigation in
pages.xml. I like having everything in one place, because it makes things cleaner and easier to maintain.You can use wildcards also in the
pages.xmlfile.So you can do something like this.
In the above example, I am using a wildcard to say that all navigation that happens from /admin/* that uses some specific action, should redirect to some page i have.
You can also be very specific with the pages
If this doesn’t help you, you need to clarify your question better.
Update
Try changing your
To this instead
UPDATE 2
Does all your navigation fail? Or is it only some?
Try removing the
/*on page view and replace with just*If you do this will work:
Now from your xhtml (Does not matter which include page it is from)
And in your pages xml
The above will work. If it does not, the error is somewhere else in your code.