struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4299) Components: "id" parameter is deleted
Date Wed, 19 Mar 2014 07:53:43 GMT

    [ https://issues.apache.org/jira/browse/WW-4299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940276#comment-13940276
] 

ASF subversion and git services commented on WW-4299:
-----------------------------------------------------

Commit cb9f0f5645d05b2f1c7c66640716acff61c4425f in struts's branch refs/heads/feature/WW-4187-correctly-identify-protocols
from phillips1021
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=cb9f0f5 ]

https://issues.apache.org/jira/browse/WW-4299 - do not assign value to id parameter if tryId
value is null this prevents overwriting a parameter with a name of id used with the component
tag

> Components: "id" parameter is deleted
> -------------------------------------
>
>                 Key: WW-4299
>                 URL: https://issues.apache.org/jira/browse/WW-4299
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tags
>    Affects Versions: 2.3.16.1
>            Reporter: Walid Ghafir
>            Assignee: Bruce Phillips
>             Fix For: 2.3.17
>
>
> When using <s:component> tag, *parameter* named "id" is not accessible in component.
 That seems to be due to UIBean.populateComponentHtmlId() method which always overwrites it
with value of *attribute* named "id", even if id attribute has not been specified.
> For example, here is a call to a test JSP component:
> {code}
> <s:component template="TestComponent.jsp">
> 	<s:param name="id" value="'testIdValue'"/>
> 	<s:param name="test" value="'testTestValue'"/>
> </s:component>
> {code}
> If TestComponent.jsp, {{parameters.test}} will have value "testTestValue" and {{parameters.id}}
will be null although it's expected to be "testIdValue".
> I think that it's due to method {{populateComponentHtmlId(Form form)}} in {{org.apache.struts2.components.UIBean}}
class that always does this, at the end of the method body:
> {code}
> addParameter("id", tryId);
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message