-
1. Re: Basic Seam navigation issue
nickarls Mar 14, 2008 10:25 PM (in response to rituraj_tiwari)Could you show your complete pages.xhtml. So that you don't e.g have a login-view="/preLogin.xhtml" that throws you back since you haven't relly done the login yet?
-
2. Re: Basic Seam navigation issue
rituraj_tiwari Mar 14, 2008 10:32 PM (in response to rituraj_tiwari)Nicklas,
Many thanks for the prompt response. Here is the complete pages.xml:<?xml version="1.0" encoding="UTF-8"?> <pages 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.0.xsd" no-conversation-view-id="/home.xhtml" login-view-id="/preLogin.xhtml"> <page view-id="*" login-required="true"> <navigation> <rule if-outcome="home"> <redirect view-id="/home.xhtml"/> </rule> </navigation> </page> <page view-id="/preLogin.xhtml"> <navigation from-action="#{Login.preLogin}"> <rule if-outcome="v1"> <redirect view-id="/loginContinueV1.xhtml"/> </rule> <rule if-outcome="v2"> <redirect view-id="/loginContinueV2.xhtml"/> </rule> </navigation> </page> <!-- TBD nagivation from loginContinue to loginComplete --> <exception class="org.jboss.seam.framework.EntityNotFoundException"> <redirect view-id="/error.xhtml"> <message>Not found</message> </redirect> </exception> <exception class="javax.persistence.EntityNotFoundException"> <redirect view-id="/error.xhtml"> <message>Not found</message> </redirect> </exception> <exception class="javax.persistence.OptimisticLockException"> <end-conversation/> <redirect view-id="/error.xhtml"> <message>Another user changed the same data, please try again</message> </redirect> </exception> <exception class="org.jboss.seam.security.AuthorizationException"> <redirect view-id="/error.xhtml"> <message>You don't have permission to do this</message> </redirect> </exception> <exception class="org.jboss.seam.security.NotLoggedInException"> <redirect view-id="/login.xhtml"> <message>Please log in first</message> </redirect> </exception> <exception class="javax.faces.application.ViewExpiredException"> <redirect view-id="/error.xhtml"> <message>Your session has timed out, please try again</message> </redirect> </exception> <exception> <redirect view-id="/error.xhtml"> <message>Unexpected error, please try again</message> </redirect> </exception> </pages>
-
3. Re: Basic Seam navigation issue
nickarls Mar 14, 2008 10:38 PM (in response to rituraj_tiwari)Try removing the login-view-id and go to the login page manually (/preLogin.seam) and see if the naviation works then. It might be as I guessed in my previous post that you get bounced back due to that.
Off to sleep, midnight soon.
-
4. Re: Basic Seam navigation issue
rituraj_tiwari Mar 16, 2008 7:01 PM (in response to rituraj_tiwari)Nicklas,
I'll have to do a better study of pages.xml. Seam is a beautiful framework and I have enjoyed using it so far. However, page navigation has got to be one of the murkiest features. Extremely difficult for a newcomer to grasp.
I think the biggest problem is the lack of a glossary. For example: What is the meaning of an action listener? What is an outcome? Does it have to be a string? Does navigate from action apply to the page I am navigating from or the page I am at? How do I create a default page for a directory so I don't have to give out a foo.seam URL?
Most documentation focuses on differences from JSF rather than describing the framework at hand.
Thanks for bearing with the rant.
-Raj