myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Werner Punz (JIRA)" <>
Subject [jira] Commented: (TRINIDAD-1051) SelectMany Shuttle javascripted links not properly rendered if url parameter is set
Date Fri, 18 Apr 2008 08:23:21 GMT


Werner Punz commented on TRINIDAD-1051:

On a second thought there are usecases where this is even viable in javascript like some context
listeners which do filtering for javascript urls etc...

Ok I will close this bug now since it is orchestra related and fixed for 2.0

> SelectMany Shuttle javascripted links not properly rendered if url parameter is set
> -----------------------------------------------------------------------------------
>                 Key: TRINIDAD-1051
>                 URL:
>             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.

View raw message