[
https://issues.apache.org/jira/browse/WW-5117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17468794#comment-17468794
]
ASF subversion and git services commented on WW-5117:
-----------------------------------------------------
Commit 9a509eb1ddfb1a3b64500e73bcee4bb3d14a0efd in struts's branch
refs/heads/WW-5117-evaluate-dynamic-attributes from Lukasz Lenart
[ https://gitbox.apache.org/repos/asf?p=struts.git;h=9a509eb ]
WW-5117 Evaluates dynamic attributes when assigning them to tag
Reverts
https://github.com/apache/struts/pull/447/commits/8bbe1949e17d58e1b5aef9c71e1279ad12ad7ba7#diff-0a39f082871f48bd14037ab2e3a3911b0b1046506c1d93338024d77d412a7075L305-L309
> %{id} evaluates different for data-* and value attribute
> --------------------------------------------------------
>
> Key: WW-5117
> URL: https://issues.apache.org/jira/browse/WW-5117
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.5.26
> Reporter: Jonas Marczona
> Assignee: Lukasz Lenart
> Priority: Major
> Fix For: 2.6, 2.5.29
>
> Time Spent: 4h 20m
> Remaining Estimate: 0h
>
> {{%\{id\}}} evaluates for "data-*" attributes in a different way than for the
> "value" attribute.
> in a very simple context where I have only one getter:
> {code}
> public Long getId() {
> return 27357L;
> }
> {code}
> The following two usages of "id" in one tag in a jsp evaluates in different
> ways:
> JSP:
> {noformat}
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <s:hidden name="first" data-wuffmiauww="%{id}" id="einszwei" value="%{id}"/>
> <s:hidden name="second" data-wuffmiauww="%{id}" value="%{id}"/>
> {noformat}
> Result:
> {noformat}
> <input type="hidden" name="first" value="27357" id="einszwei"
> data-wuffmiauww="einszwei">
> <input type="hidden" name="second" value="27357" data-wuffmiauww>
> {noformat}
> I expect the Id of my getter - for both cases.
> The value for {{data-wuffmiauww}} is wrong.
> With struts2 version 2.5.20 the result was correct:
> {noformat}
> <input type="hidden" name="first" value="27357" id="einszwei"
> data-wuffmiauww="27357">
> <input type="hidden" name="second" value="27357" data-wuffmiauww="27357">
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)