You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Qiang Zheng (JIRA)" <ji...@apache.org> on 2009/02/10 18:42:45 UTC

[jira] Created: (WW-2993) double Name expression gets escaped without being evaluated

double Name expression gets escaped without being evaluated
-----------------------------------------------------------

                 Key: WW-2993
                 URL: https://issues.apache.org/struts/browse/WW-2993
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.14
            Reporter: Qiang Zheng


In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
"%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
-----------------------------------------------------------------
if (doubleId != null) {
.....           
        } else if (form != null) {
            addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
        } else {
            addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
        }
-----------------------------------------------------------------
Should it acutally be:


if (doubleId != null) {
.....           
        } else if (form != null) {
            addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
        } else {
            addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
        }



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


[jira] Commented: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Qiang Zheng (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46038#action_46038 ] 

Qiang Zheng commented on WW-2993:
---------------------------------

I got this error when try  to build:

Downloading: http://people.apache.org/maven-snapshot-repository/com/opensymphony
/xwork/2.1.3-SNAPSHOT/xwork-2.1.3-SNAPSHOT-sources.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: com.opensymphony
ArtifactId: xwork
Version: 2.1.3-SNAPSHOT

Reason: Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file -DgroupId=com.opensymphony -DartifactId=xwork -Dver
sion=2.1.3-SNAPSHOT -Dclassifier=sources -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=com.opensymphony -DartifactId=xwork -Dversi
on=2.1.3-SNAPSHOT -Dclassifier=sources -Dpackaging=jar -Dfile=/path/to/file -Dur
l=[url] -DrepositoryId=[id]

I check the url it was using looks like only 2.1.2 snapshot is available.
Should we update the pom.xml as well?




> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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


[jira] Commented: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Qiang Zheng (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46069#action_46069 ] 

Qiang Zheng commented on WW-2993:
---------------------------------

I agree. That looks even better on balance of readability and conciseness.

> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>            Assignee: Wes Wannemacher
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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


[jira] Commented: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Qiang Zheng (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46067#action_46067 ] 

Qiang Zheng commented on WW-2993:
---------------------------------

Thanks for all the tips about mvn and your help on check in the changes.

I was thinking to reorganize code bit      

---------- from this before the change ---------------------------------------------------
} else if (form != null) {
            addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
        } else {
            addParameter("doubleId", escape(doubleName != null ? findString(doubleName) : null));
        }


------------ to This  --------------------------------------------------------------------------
 } else {
            addParameter("doubleId", (form != null?(form.getParameters().get("id") + "_"):"") + escape(doubleName !=null ? findString(doubleName) : null));
        }
--------------------------------------------------------------------------------------------------

But the original fix should be fine as well.
Thanks again.


> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>            Assignee: Wes Wannemacher
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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


[jira] Updated: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes Wannemacher updated WW-2993:
--------------------------------

    Fix Version/s: 2.1.7

can you turn this into a patch so that we can apply it easily and test 

> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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


[jira] Commented: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46008#action_46008 ] 

Wes Wannemacher commented on WW-2993:
-------------------------------------

no, that makes it difficult for us to absorb the change. The easiest way I've found to make a patch is to checkout the source code like so -

svn co https://svn.apache.org/repos/asf/struts/current/ struts

(note - this will take a while since it will download the entire struts distribution [struts 1 and struts 2])

Then, drill down into the files you want to change, eg. -

cd struts2/core/src/main/java/org/apache/struts2/wherever

make your changes - 

vim DoubleListUIBean.java

*rebuild the framework (using maven if you're familiar with it) 

cd ../../../../../../ (however far it takes to go into the core folder again)
mvn clean install

and watch to see if any unit tests fail and correct any problems
then, run svn diff to see what changes have been made 

svn diff . (do this from a source directory anywhere in the tree)

this will output the patch file, so you can redirect it somewhere to get an uploadable file

svn diff . > /tmp/ww-2993.patch

then, attach that file to this JIRA issue, but make sure that you mark the checkmark that gives us permission to use it for ASF purposes.

To summarize - 

svn co https://svn.apache.org/repos/asf/struts/current/ struts
cd struts/struts2/core/src/main/java/org/apache/struts2/components/
vim DoubleListUIBean.java
svn diff . > /tmp/ww-2993.patch

and upload it here. It seems like a lot of work, but if you're using an IDE, most of this can be automated, just tell Eclipse/IDEA to pull a maven project down from the repository (https://svn.apache.org/repos/asf/struts/struts2/core/trunk) and make the changes in your IDE, then tell the IDE to create a patch file. It's easier this way, but sometimes launching, configuring the IDE and importing a project can take longer than just doing it on the command line, either way, dealing with patches helps us track the contributions and tie them to the contributor (you in this case) for proper attribution.

> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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


[jira] Commented: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46068#action_46068 ] 

Dave Newton commented on WW-2993:
---------------------------------

I'm perhaps overly-fond of the ternary operator, but that's much harder to read and understand. I'd propose this:

    String escDoubleName = escape(doubleName != null ? findString(doubleName) : null);
    String doubleId = escDoubleName;
    if (form != null) {
        doubleId = form.getParameters().get("id") + "_" + doubleId;
    }


> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>            Assignee: Wes Wannemacher
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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


[jira] Commented: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46040#action_46040 ] 

Wes Wannemacher commented on WW-2993:
-------------------------------------

Qiang, there are a few places to get the jar files. I forgot that xwork was a snapshot dependency, snapshot dependencies aren't always published. You can certainly build it as well, but it's probably easier to just download it... The latest one is available here - 

http://hudson.zones.apache.org/hudson/view/Struts/job/xwork2/32/com.opensymphony$xwork/

Just click on the one that says xwork-2.1.3-SNAPSHOT.jar... Then, you'll have to issue the command 'mvn install:install-file' just as it says. I'll check out the pom, etc. when I get a chance, but typically we don't worry too much about making sure that snapshots are available. We make pseudo-nightly builds available here - 

http://people.apache.org/builds/struts/nightlies/2.x/

But, it would be harder to make a patch from a zip. You'd have to keep a copy of the original and diff against it, etc. Plus, a patch generated that way is harder to apply. Thanks for helping out! Contributions from users are what makes open source what it is :)

> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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


[jira] Resolved: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes Wannemacher resolved WW-2993.
---------------------------------

    Resolution: Fixed
      Assignee: Wes Wannemacher

change committed to SVN, thanks for the fix.

> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>            Assignee: Wes Wannemacher
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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


[jira] Commented: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Qiang Zheng (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46005#action_46005 ] 

Qiang Zheng commented on WW-2993:
---------------------------------

I'd like to but not sure how to "turn this into a patch". Should I just attach the DoubleListUIBean.java with my correction on it?

> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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


[jira] Commented: (WW-2993) double Name expression gets escaped without being evaluated

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46070#action_46070 ] 

Dave Newton commented on WW-2993:
---------------------------------

Bah, that wasn't the right snippet anyway:

    String doubleId = escape(doubleName != null ? findString(doubleName) : null);
    if (form != null) {
        doubleId = form.getParameters().get("id") + "_" + doubleId;
    }


> double Name expression gets escaped without being evaluated
> -----------------------------------------------------------
>
>                 Key: WW-2993
>                 URL: https://issues.apache.org/struts/browse/WW-2993
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14
>            Reporter: Qiang Zheng
>            Assignee: Wes Wannemacher
>             Fix For: 2.1.7
>
>
> In DoubleListUIBean.java, there is one piece of code trying to populate "doubleId" parameter. Looks like when "form!=null" this.doubleName get escaped without being evaluated. The counter part in "form is null" case does "findString" before do "escape". This cause problem when we pass in doubleName as
> "%{#attr.name}", the lower part of "doubleId" became "_%{#attr_name}". Here is the code.
> -----------------------------------------------------------------
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }
> -----------------------------------------------------------------
> Should it acutally be:
> if (doubleId != null) {
> .....           
>         } else if (form != null) {
>             addParameter("doubleId", form.getParameters().get("id") + "_" +escape(doubleName !=null ? findString(doubleName) : null));
>         } else {
>             addParameter("doubleId", escape(doubleName !=null ? findString(doubleName) : null));
>         }

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