org.apache.tiles.jsp.taglib
Class PutAttributeTag

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

public class PutAttributeTag
extends SimpleTagSupport

Put an attribute in enclosing attribute container tag.

Enclosing attribute container tag can be :

(or any other tag which implements the PutAttributeTagParent interface. Exception is thrown if no appropriate tag can be found.

Put tag can have following atributes :

Value can also come from tag body. Tag body is taken into account only if value is not set by one of the tag attributes. In this case Attribute type is "string", unless tag body define another type.


Constructor Summary
PutAttributeTag()
           
 
Method Summary
 void doTag()
          
 String getExpression()
          Getter for expression property.
 String getName()
          Getter for name property.
 String getRole()
          Getter for role property.
 String getType()
          Getter for type property.
 Object getValue()
          Getter for value property.
 boolean isCascade()
          Getter for cascade property.
 void setCascade(boolean cascade)
          Setter for cascade property.
 void setExpression(String expression)
          Setter for expression property.
 void setName(String name)
          Setter for name property.
 void setRole(String role)
          Setter for role property.
 void setType(String type)
          Setter for type property.
 void setValue(Object value)
          Setter for value property.
 
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

PutAttributeTag

public PutAttributeTag()
Method Detail

getName

public String getName()
Getter for name property.

Returns:
The name of the attribute to put.

setName

public void setName(String name)
Setter for name property.

Parameters:
name - The name of the attribute to put.

getValue

public Object getValue()
Getter for value property.

Returns:
The value of the attribute. Use this parameter, or expression, or body.

setValue

public void setValue(Object value)
Setter for value property.

Parameters:
value - The value of the attribute. Use this parameter, or expression, or body.

getExpression

public String getExpression()
Getter for expression property.

Returns:
The expression to calculate the value from. Use this parameter, or value, or body.

setExpression

public void setExpression(String expression)
Setter for expression property.

Parameters:
expression - The expression to calculate the value from. Use this parameter, or value, or body.

getRole

public String getRole()
Getter for role property.

Returns:
A comma-separated list of roles. If present, the attribute will be rendered only if the current user belongs to one of the roles.

setRole

public void setRole(String role)
Setter for role property.

Parameters:
role - A comma-separated list of roles. If present, the attribute will be rendered only if the current user belongs to one of the roles.

getType

public String getType()
Getter for type property.

Returns:
The type (renderer) of the attribute.

setType

public void setType(String type)
Setter for type property.

Parameters:
type - The type (renderer) of the attribute.

isCascade

public boolean isCascade()
Getter for cascade property.

Returns:
If true the attribute will be cascaded to all nested attributes.

setCascade

public void setCascade(boolean cascade)
Setter for cascade property.

Parameters:
cascade - If true the attribute will be cascaded to all nested attributes.

doTag

public void doTag()
           throws JspException,
                  IOException

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


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