[seam-issues] [JBoss JIRA] (JBSEAM-5142) s:link fragment parameter ignored

Robert Becker (JIRA) issues at jboss.org
Wed Nov 19 05:31:40 EST 2014


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

Robert Becker commented on JBSEAM-5142:
---------------------------------------

I just switched to the new h:link tag which also supports the fragment attribute and works as expected.

> s:link fragment parameter ignored
> ---------------------------------
>
>                 Key: JBSEAM-5142
>                 URL: https://issues.jboss.org/browse/JBSEAM-5142
>             Project: Seam 2
>          Issue Type: Bug
>          Components: JSF Controls
>    Affects Versions: 2.3.1.Final
>            Reporter: Robert Becker
>
> Since upgrading to Seam 2.3.x (from 2.2.2), the s:link fragment attribute is ignored. 
> Code example:
> {code:xml}
> <s:link value="#{msg.back}" propagation="none" fragment="article_#{param['samsArticleComponent.showSingleArticle']}">
>   <f:param name="samsArticleComponent.page" value="#{param['samsArticleComponent.page']}"/>
> </s:link>
> {code}
> Produces the following href attribute: https://[...]/cms/home.xhtml?samsArticleComponent.page=0
> I noticed changes in org.jboss.seam.ui.util.ViewUrlBuilder.java since 2.2.2:
> {code:title=Seam 2.2.2}
>     @Override
>     public String getEncodedUrl() {
>         return FacesContext.getCurrentInstance().getExternalContext().encodeActionURL(super.getEncodedUrl());
>     }
> {code}
> {code:title=Seam 2.3.1}
>     @Override
>     public String getEncodedUrl() 
>     {
>        FacesContext facesContext = FacesContext.getCurrentInstance();
>        return facesContext.getApplication().getViewHandler().getBookmarkableURL(facesContext, this.viewId, getParametersAsMap(getParameters()), false);
>     }
> {code}
> In Seam 2.2.2, super.getEncodedUrl() took care of including the fragment. I guess this got lost when switching to the new method.



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the seam-issues mailing list