[ 
https://issues.jboss.org/browse/JBSEAM-5142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Becker updated JBSEAM-5142:
----------------------------------
    Description: 
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.

  was:
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.



> 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)
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to