[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-2542) Seam-gen generates false s:link in menu.xhtml (the logout link)

Mark Schmatz (JIRA) jira-events at lists.jboss.org
Sun Jan 27 13:26:21 EST 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-2542?page=all ]

Mark Schmatz updated JBSEAM-2542:
---------------------------------

    Description: 
Seam-gen generates the following code in the menu.xhtml page:

<s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>

We have here both, the 'view' and the 'action' attributes at the same time. Is this well-defined? I would propose to discard the 'view' attribute and replace the EL in the 'action' attribute with:

#{authenticator.logout}

Additionally, in the Authenticator class the logout method should be provided (automatically generated by Seam-gen) which invokes 'identity.logout(). In the pages.xml a respective navigation to the "/home.xhtml" page should be performed.

The advantage - besides having a proper s:link - is that one can do additional stuff in the logout method before and/or after logging out.

  was:
Seam-gen generates the following code in the menu.xhtml page:

<s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>

We have here both, the 'view' and the 'action' attribute at the same time. Is this well-defined? I would propose to discard the 'view' attribute and replace the EL in the 'action' attribute with:

#{authenticator.logout}

Additionally, in the Authenticator class the logout method should be provided (automatically generated by Seam-gen) which invokes 'identity.logout(). In the pages.xml a respective navigation to the "/home.xhtml" page should be performed.

The advantage - besides having a proper s:link - is that one can do additional stuff in the logout method before and/or after logging out.


> Seam-gen generates false s:link in menu.xhtml (the logout link)
> ---------------------------------------------------------------
>
>                 Key: JBSEAM-2542
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2542
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Mark Schmatz
>
> Seam-gen generates the following code in the menu.xhtml page:
> <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
> We have here both, the 'view' and the 'action' attributes at the same time. Is this well-defined? I would propose to discard the 'view' attribute and replace the EL in the 'action' attribute with:
> #{authenticator.logout}
> Additionally, in the Authenticator class the logout method should be provided (automatically generated by Seam-gen) which invokes 'identity.logout(). In the pages.xml a respective navigation to the "/home.xhtml" page should be performed.
> The advantage - besides having a proper s:link - is that one can do additional stuff in the logout method before and/or after logging out.

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

        



More information about the seam-issues mailing list