struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Walid Ghafir (JIRA)" <>
Subject [jira] [Created] (WW-4299) Components: "id" parameter is deleted
Date Tue, 11 Mar 2014 18:01:51 GMT
Walid Ghafir created WW-4299:

             Summary: Components: "id" parameter is deleted
                 Key: WW-4299
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Tags
    Affects Versions:
            Reporter: Walid Ghafir
            Priority: Critical

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:
<s:component template="TestComponent.jsp">
	<s:param name="id" value="'testIdValue'"/>
	<s:param name="test" value="'testTestValue'"/>
If TestComponent.jsp, {{parameters.test}} will have value "testTestValue" and {{}}
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:
addParameter("id", tryId);

This message was sent by Atlassian JIRA

View raw message