Package org.apache.struts2.components
Class Property
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.Property
Used to get the property of a value, which will default to the top of the stack if none is specified.
- default (String) - The default value to be used if value attribute is null
- escapeCsv (Boolean) - Escape CSV. Defaults to false
- escapeHtml (Boolean) - Escape HTML. Defaults to true
- escapeJavaScript (Boolean) - Escape JavaScript. Defaults to false
- escapeXml (Boolean) - Escape XML. Defaults to false
- value (Object) - value to be displayed
 
 <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')" />
 
 - 
Field SummaryFields inherited from class org.apache.struts2.components.ComponentactionMapper, attributes, COMPONENT_STACK, devMode, escapeHtmlBody, performClearTagStateForTagPoolingServers, stack, standardAttributesMap, throwExceptionOnELFailure
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidsetDefault(String defaultValue) voidsetDefaultValue(String defaultValue) voidsetEscapeCsv(boolean escapeCsv) voidsetEscapeHtml(boolean escape) voidsetEscapeJavaScript(boolean escapeJavaScript) voidsetEscapeXml(boolean escapeXml) voidbooleanCallback for the start tag of this component.Methods inherited from class org.apache.struts2.components.ComponentaddAllAttributes, addParameter, completeExpression, copyAttributes, determineActionURL, determineNamespace, end, end, escapeHtmlBody, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getAttributes, getComponentStack, getNamespace, getPerformClearTagStateForTagPoolingServers, getStack, getStandardAttributes, isAcceptableExpression, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setEscapeHtmlBody, setNotExcludedAcceptedPatterns, setPerformClearTagStateForTagPoolingServers, setThrowExceptionsOnELFailure, setUrlHelper, stripExpression, toString, usesBody
- 
Constructor Details- 
Property
 
- 
- 
Method Details- 
setDefault
- 
setEscapeHtmlpublic void setEscapeHtml(boolean escape) 
- 
setEscapeJavaScriptpublic void setEscapeJavaScript(boolean escapeJavaScript) 
- 
setValue
- 
setDefaultValue
- 
setEscapeCsvpublic void setEscapeCsv(boolean escapeCsv) 
- 
setEscapeXmlpublic void setEscapeXml(boolean escapeXml) 
- 
startDescription copied from class:ComponentCallback for the start tag of this component. Should the body be evaluated?
 
-