public class Property extends Component
Used to get the property of a value, which will default to the top of the stack if none is specified.
<s:push value="myBean"> <s:property value="myBeanProperty" /> TextUtils <s:property value="myBeanProperty" default="a default value" /> </s:push>
Example 1 prints the result of myBean's getMyBeanProperty() method. Example 2 prints the result of myBean's getMyBeanProperty() method and if it is null, print 'a default value' instead.
<s:property value="getText('some.key')" />
actionMapper, COMPONENT_STACK, devMode, parameters, stack, standardAttributesMap, throwExceptionOnELFailure
Constructor and Description |
---|
Property(ValueStack stack) |
Modifier and Type | Method and Description |
---|---|
void |
setDefault(String defaultValue) |
void |
setDefaultValue(String defaultValue) |
void |
setEscapeCsv(boolean escapeCsv) |
void |
setEscapeHtml(boolean escape) |
void |
setEscapeJavaScript(boolean escapeJavaScript) |
void |
setEscapeXml(boolean escapeXml) |
void |
setValue(String value) |
boolean |
start(Writer writer)
Callback for the start tag of this component.
|
addAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, copyParams, determineActionURL, determineNamespace, end, end, escapeHtmlBody, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, getStandardAttributes, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setThrowExceptionsOnELFailure, setUrlHelper, stripExpressionIfAltSyntax, toString, usesBody
public Property(ValueStack stack)
public void setDefault(String defaultValue)
public void setEscapeHtml(boolean escape)
public void setEscapeJavaScript(boolean escapeJavaScript)
public void setValue(String value)
public void setDefaultValue(String defaultValue)
public void setEscapeCsv(boolean escapeCsv)
public void setEscapeXml(boolean escapeXml)
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.