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

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


Robert Becker created JBSEAM-5142:
-------------------------------------

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