[seam-issues] [JBoss JIRA] Commented: (JBSEAM-4495) Page actions do not work with JSF 2.0

Dan Allen (JIRA) jira-events at lists.jboss.org
Wed Feb 3 18:15:19 EST 2010


    [ https://jira.jboss.org/jira/browse/JBSEAM-4495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12510260#action_12510260 ] 

Dan Allen commented on JBSEAM-4495:
-----------------------------------

Here's how to address the specific problem filed in this issue report (so it works with any version of JSF).

The page action in question handles the case where, if you are signed in already when you request /home.seam, you are directed from the home page to the main (search) page. So the correct rule that handles both outcomes is as follows:

<page view-id="/home.xhtml" action="#{identity.isLoggedIn}">

   <navigation from-action="#{identity.isLoggedIn}">
      <rule if-outcome="true">
         <redirect view-id="/main.xhtml"/>
      </rule>
      <rule if-outcome="false">
         <render view-id="/home.xhtml"/>
      </rule>
   </navigation>
   ...
</page>

Note the use of the <render> tag. The <render> navigation does not trigger another invocation of the page actions, so it is a safe way to "exit out" to the current view.

To sum things up, in JSF 2.0 (as it stands now), you have to deal with each of the possible non-null outcome values of a page action, or else implicit navigation is going to kick in. Annoying, but a safe work around.

> Page actions do not work with JSF 2.0
> -------------------------------------
>
>                 Key: JBSEAM-4495
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4495
>             Project: Seam
>          Issue Type: Bug
>          Components: JSF Integration
>    Affects Versions: 2.2.0.GA
>            Reporter: Jozef Hartinger
>            Assignee: Norman Richards
>            Priority: Blocker
>             Fix For: 2.2.1.CR1
>
>
> Looks like implicit navigation in JSF 2.0 messes up with page actions in Seam. For instance, the following page action from the booking example:
> <page view-id="/home.xhtml" action="#{identity.isLoggedIn}">
> seems to cause the result of the action (false) to be taken as an implicit navigation information and the application fails with
> HTTP Status 404 - /seam-booking/false.seam

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list