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

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 :

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.

Version:
$Rev: 796822 $ $Date: 2009-07-22 20:25:50 +0200 (mer, 22 lug 2009) $

Constructor Summary
PutAttributeTag()
           
 
Method Summary
 void doTag()
          
 String getExpression()
          Returns the expression to calculate the value from.
 String getName()
          Returns the name of the attribute.
 String getRole()
          Returns the role to check.
 String getType()
           Returns content type: string, template or definition.
 Object getValue()
          Returns the attribute value.
 boolean isCascade()
          Checks if the attribute should be cascaded to nested definitions.
 void setCascade(boolean cascade)
          Sets the property that tells if the attribute should be cascaded to nested definitions.
 void setExpression(String expression)
          Sets the expression to calculate the value from.
 void setName(String name)
          Sets the name of the attribute.
 void setRole(String role)
          Sets the role to check.
 void setType(String type)
           Sets content type: string, template or definition.
 void setValue(Object value)
          Sets the attribute 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

PutAttributeTag

public PutAttributeTag()
Method Detail

getName

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

Returns:
The name of the attribute.

setName

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

Parameters:
name - The name of the attribute.

isCascade

public boolean isCascade()
Checks if the attribute should be cascaded to nested definitions.

Returns:
true if the attribute will be cascaded.
Since:
2.1.0

setCascade

public void setCascade(boolean cascade)
Sets the property that tells if the attribute should be cascaded to nested definitions.

Parameters:
cascade - true if the attribute will be cascaded.
Since:
2.1.0

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.

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.

getValue

public Object getValue()
Returns the attribute value.

Returns:
Attribute value. Can be a String or Object.

setValue

public void setValue(Object value)
Sets the attribute value.

Parameters:
value - Attribute value. Can be a String or Object.

getExpression

public String getExpression()
Returns the expression to calculate the value from. Use this parameter, or value, or body.

Returns:
The expression
Since:
2.2.0

setExpression

public void setExpression(String expression)
Sets the expression to calculate the value from. Use this parameter, or value, or body.

Parameters:
expression - The expression
Since:
2.2.0

getType

public String getType()

Returns content type: string, template or definition.

Returns:
The attribute type.

setType

public void setType(String type)

Sets content type: string, template or definition.

Parameters:
type - The attribute type.

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.