This project has retired. For details please refer to its Attic page.
GetAsStringTag (Tiles 2 2.2.2 API)

org.apache.tiles.jsp.taglib
Class GetAsStringTag

Package class diagram package GetAsStringTag
java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by org.apache.tiles.jsp.taglib.GetAsStringTag
All Implemented Interfaces:
JspTag, SimpleTag

public class GetAsStringTag
extends SimpleTagSupport

Retrieve the value of the specified definition/template attribute property, and render it to the current JspWriter as a String. The usual toString() conversion is applied on the found value.

Version:
$Rev: 929598 $ $Date: 2010-03-31 17:53:02 +0200 (mer, 31 mar 2010) $

Constructor Summary
GetAsStringTag()
           
 
Method Summary
 void doTag()
          
 Object getDefaultValue()
          Returns the default value, that is evaluated only if value is null and the attribute with the associated name is null.
 String getDefaultValueRole()
          Returns the role to check for the default value.
 String getDefaultValueType()
          Returns the default value type.
 String getName()
          Returns the name of the attribute.
 String getPreparer()
          Returns the preparer name.
 String getRole()
          Returns the role to check.
 Object getValue()
          Get the value.
 boolean isFlush()
          Returns the flush flag.
 boolean isIgnore()
          Returns the ignore flag.
 void setDefaultValue(Object defaultValue)
          Sets the default value, that is evaluated only if value is null and the attribute with the associated name is null.
 void setDefaultValueRole(String defaultValueRole)
          Sets the role to check for the default value.
 void setDefaultValueType(String defaultValueType)
          Sets the default value type.
 void setFlush(boolean flush)
          Sets the flush flag.
 void setIgnore(boolean ignore)
          Sets the ignore flag.
 void setName(String value)
          Sets the name of the attribute.
 void setPreparer(String preparer)
          Sets the preparer name.
 void setRole(String role)
          Sets the role to check.
 void setValue(Object value)
          Set the value.
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetAsStringTag

public GetAsStringTag()
Method Detail

setName

public void setName(String value)
Sets the name of the attribute.

Parameters:
value - The name of the attribute.

getName

public String getName()
Returns the name of the attribute.

Returns:
The name of the attribute.

getValue

public Object getValue()
Get the value.

Returns:
The value.

setValue

public void setValue(Object value)
Set the value.

Parameters:
value - The new value

getDefaultValue

public Object getDefaultValue()
Returns the default value, that is evaluated only if value is null and the attribute with the associated name is null.

Returns:
The default value.

setDefaultValue

public void setDefaultValue(Object defaultValue)
Sets the default value, that is evaluated only if value is null and the attribute with the associated name is null.

Parameters:
defaultValue - The default value to set.

getDefaultValueType

public String getDefaultValueType()
Returns the default value type. It will be used only if getDefaultValue() is a string.

Returns:
The default value type.

setDefaultValueType

public void setDefaultValueType(String defaultValueType)
Sets the default value type. To be used in conjunction with setDefaultValue(Object) when passing a string.

Parameters:
defaultValueType - The default value type.

getDefaultValueRole

public String getDefaultValueRole()
Returns the role to check for the default value. If the user is in the specified role, the default value is taken into account; otherwise, it is ignored (skipped).

Returns:
The default value role.

setDefaultValueRole

public void setDefaultValueRole(String defaultValueRole)
Sets the role to check for the default value. If the user is in the specified role, the default value is taken into account; otherwise, it is ignored (skipped).

Parameters:
defaultValueRole - The default value role.

getRole

public String getRole()
Returns the role to check. If the user is in the specified role, the tag is taken into account; otherwise, the tag is ignored (skipped).

Returns:
The role to check.
Since:
2.1.1

setRole

public void setRole(String role)
Sets the role to check. If the user is in the specified role, the tag is taken into account; otherwise, the tag is ignored (skipped).

Parameters:
role - The role to check.
Since:
2.1.1

getPreparer

public String getPreparer()
Returns the preparer name.

Returns:
The preparer name.
Since:
2.1.1

setPreparer

public void setPreparer(String preparer)
Sets the preparer name.

Parameters:
preparer - The preparer name.
Since:
2.1.1

isFlush

public boolean isFlush()
Returns the flush flag. If true, current page out stream is flushed after insertion.

Returns:
The flush flag.
Since:
2.1.1

setFlush

public void setFlush(boolean flush)
Sets the flush flag. If true, current page out stream is flushed after insertion.

Parameters:
flush - The flush flag.
Since:
2.1.1

isIgnore

public boolean isIgnore()
Returns the ignore flag. If it is set to true, and the attribute specified by the name does not exist, simply return without writing anything. The default value is false, which will cause a runtime exception to be thrown.

Returns:
The ignore flag.
Since:
2.1.1

setIgnore

public void setIgnore(boolean ignore)
Sets the ignore flag. If this attribute is set to true, and the attribute specified by the name does not exist, simply return without writing anything. The default value is false, which will cause a runtime exception to be thrown.

Parameters:
ignore - The ignore flag.
Since:
2.1.1

doTag

public void doTag()
           throws JspException,
                  IOException

Specified by:
doTag in interface SimpleTag
Overrides:
doTag in class SimpleTagSupport
Throws:
JspException
IOException


Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.