org.apache.struts2.components
类 Property

java.lang.Object
  继承者 org.apache.struts2.components.Component
      继承者 org.apache.struts2.components.Property

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.

 

 
     
     

     TextUtils
     
 

 
 
 

 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')" />

 
 


字段摘要
 
从类 org.apache.struts2.components.Component 继承的字段
COMPONENT_STACK
 
构造方法摘要
Property(com.opensymphony.xwork2.util.ValueStack stack)
           
 
方法摘要
 void setDefault(String defaultValue)
           
 void setDefaultValue(String defaultValue)
           
 void setEscape(boolean escape)
           
 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.
 
从类 org.apache.struts2.components.Component 继承的方法
addAllParameters, addParameter, altSyntax, copyParams, end, getComponentStack, getParameters, getStack, setActionMapper, setThrowExceptionsOnELFailure, setUrlHelper, usesBody
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Property

public Property(com.opensymphony.xwork2.util.ValueStack stack)
方法详细信息

setDefault

public void setDefault(String defaultValue)

setEscape

public void setEscape(boolean escape)

setEscapeHtml

public void setEscapeHtml(boolean escape)

setEscapeJavaScript

public void setEscapeJavaScript(boolean escapeJavaScript)

setValue

public void setValue(String value)

setDefaultValue

public void setDefaultValue(String defaultValue)

setEscapeCsv

public void setEscapeCsv(boolean escapeCsv)

setEscapeXml

public void setEscapeXml(boolean escapeXml)

start

public boolean start(Writer writer)
从类 Component 复制的描述
Callback for the start tag of this component. Should the body be evaluated?

覆盖:
Component 中的 start
参数:
writer - the output writer.
返回:
true if the body should be evaluated