[
https://issues.apache.org/struts/browse/WW-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46681#action_46681
]
Arthur Nogueira Neves commented on WW-2273:
-------------------------------------------
I find out that behave already be implemented. Bellow fallow the code:
if (value != null) {
if (component instanceof UnnamedParametric) {
((UnnamedParametric) component).addParameter(findValue(value));
} else {
String name = findString(this.name);
if (name == null) {
throw new StrutsException("No name found for following
expression: " + this.name);
}
Object value = findValue(this.value);
component.addParameter(name, value);
}
} else {
if (component instanceof UnnamedParametric) {
((UnnamedParametric) component).addParameter(body);
} else {
component.addParameter(findString(name), body);
}
}
Therefor we can close this issue!
> s:param tag should allow values to be set in the body-content area
> ------------------------------------------------------------------
>
> Key: WW-2273
> URL: https://issues.apache.org/struts/browse/WW-2273
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Tags
> Reporter: Gunnar Hillert
> Fix For: 2.1.9
>
> Attachments: paramtag.patch.zip
>
>
> Right now the content tag only works this way:
> <s:param value="22"></s:param>
> However, it would be nice if I could specify the value using the following
> syntax as well:
> <s:param>22</s:param>
> That would also make it behave similar to the JSTL tag equivalent:
> (From the spec, jstl-1_0-fr-spec.pdf, page: 7-75)
> Syntax 1: Parameter value specified in attribute "value"
> <c:param name="name" value="value"/>
> Syntax 2: Parameter value specified in the body content
> <c:param name="name">
> parameter value
> </c:param>
> </c:param>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.