mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-2435 "<s:set> tag does not evaluate Body" Apply patch suggested by Lukasz Racon.
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@614751 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -101,7 +101,7 @@ public class Set extends ContextBean {
|
||||
}
|
||||
|
||||
body="";
|
||||
|
||||
|
||||
if ("application".equalsIgnoreCase(scope)) {
|
||||
stack.setValue("#application['" + getVar() + "']", o);
|
||||
} else if ("session".equalsIgnoreCase(scope)) {
|
||||
@@ -118,14 +118,14 @@ public class Set extends ContextBean {
|
||||
return super.end(writer, body);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* TODO: set required=true when 'id' is dropped after 2.1
|
||||
*/
|
||||
@StrutsTagAttribute(description="Name used to reference the value pushed into the Value Stack")
|
||||
public void setVar(String var) {
|
||||
super.setVar(var);
|
||||
}
|
||||
|
||||
|
||||
@StrutsTagAttribute(description="Deprecated. Use 'var' instead")
|
||||
public void setName(String name) {
|
||||
setVar(name);
|
||||
@@ -141,4 +141,9 @@ public class Set extends ContextBean {
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean usesBody() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user