[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-4455) Seamspace -- incorrect viewIds lead to missing page parameter propagation

Wolfgang Schwendt (JIRA) jira-events at lists.jboss.org
Sat Oct 24 21:45:05 EDT 2009


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

Wolfgang Schwendt commented on JBSEAM-4455:
-------------------------------------------

Because I'm using an own version of Seamspace with Maven-based build files, my version of Seamspace was not fully synchronized with the repository and therefore outdated, ie. it did not yet include the fix introduced in Rev. 11352 (2009/Aug/07).   Sorry for that, Shane!  

Rev. 11352 fixed the exeption that  was thrown when the "friend request" link was clicked.   This bug fix added an explicit f:param child element to the s:link element.   This is certainly a possible bug fix, even though the f:param element would be redundant if viewIds had been correctly written with the suffix ".html" rather than ".seam".  Or put in other words, the explicit f:param child element is only needed because page parameter propagation is not working when the "/friendrequest.xhtml" target viewId is accidentally referred to as "/friendrequest.seam".  Note that  in pages.xml the definition of view "/friendrequest.xhtml"> includes a page parameter, so normally the s:link should include this page parameter, when rendered, and no explicit f:param child element is necessary in the facelets template file.

Given that Seamspace serves as Seam tutorial, I therefore still propose to correct the view attributes of s:button and s:link from  "viewId.seam" to "viewId.xhtml"
 






> Seamspace -- incorrect viewIds lead  to missing page parameter propagation
> --------------------------------------------------------------------------
>
>                 Key: JBSEAM-4455
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4455
>             Project: Seam
>          Issue Type: Bug
>          Components: Examples
>    Affects Versions: 2.2.0.GA
>         Environment: Seam 2.2 Rev. 11569 http://anonsvn.jboss.org/repos/seam/branches/community/Seam_2_2
>            Reporter: Wolfgang Schwendt
>            Priority: Trivial
>
> When s:link and s:button are used in the facelets view template files of  the Seamspace example,
> the JSF viewId to link to is written incorrectly.
> Right now in the Seamspace example, the viewId to link to is written as follows:
> s:link  view="/friendrequest.seam" value="Send a friend request" propagation="none"...
> Instead of using the suffix/extension ".seam", the viewId to link to must be correctly written with the suffix/extension ".xhtml":
> s:link  view="/friendrequest.seam" value="Send a friend request" propagation="none"...
> If ".seam" is used rather than ".xhtml", it leads to the missing propagation of page parameters.  When an s:link/s:button is rendered, UISeamCommandBase.getUrl() retrieves the set of page parameters from Pages.getStringValuesFromModel().    The Pages component holds metadata for pages defined in pages.xml, including page parameters.  When the wrong viewId is used, Pages.getStringValuesFromModel() does not find the page parameters for the JSF view to link to, and therefore page parameters are omitted when rendering the link.   For example, when the viewID is written with '.seam', the link for sending a friend request is rendered with the target URL  http://127.0.0.1:8080/seamspace/friendrequest.seam, but it should be http://127.0.0.1:8080/seamspace/friendrequest.seam?name=shadowman

-- 
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