[ 
https://issues.apache.org/jira/browse/TRINIDAD-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590328#action_12590328
 ] 

Werner Punz commented on TRINIDAD-1051:
---------------------------------------

I am still not entirely convinced if we dont have a problem here. Orchestra 
might have fixed it but what happens with other libs which do the same.
My guess is Trinidad itself should look for javascripts in hrefs and then omit 
the encodeActionURL, since technically spoken
in a javascript trigger no other url info should be appended nor the code has 
to be altered by other layers!


> SelectMany Shuttle javascripted links not properly rendered if url parameter 
> is set
> -----------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1051
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1051
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions:  1.0.8-core
>         Environment: All environments
>            Reporter: Werner Punz
>            Assignee: Werner Punz
>
> The problem is that the selectmany shuttle component renders its links via 
> href 
> and javascript and then refers to  
> org.apache.myfaces.trinidad.render.CoreRenderer.renderEncodedActionURI
>    value = context.getExternalContext().encodeActionURL(value.toString());
> While this is a proper way to handle an incoming url in this case it is not 
> because
> if you pass down javascripts and put them into this method incoming url 
> parameters will be attached
> ie
> javascript:TrXXX.doMyAction();?myparam=1
> This exactly happens in the shuttle component in such a case and renders the 
> javascript links invalid.
> Now:
> The solution would be to change the code
>  in the selectManyShuttleRenderer responsible for rendering the link from
>   if(href != null) {
>               renderEncodedActionURI(context, "href", href);
>   }
> to
>   if(href != null && href.startsWith("javascript:")) {
>               rw.writeAttribute("href", href, null);
>    } else {
>               renderEncodedActionURI(context, "href", href);
>    }
> Problem is the writeAttribute probably also belongs to a base class
> any comments by the trinidad core committers on this (Matze?)?
> I need feedback before fixing this in the trunk!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to