org.apache.tiles.jsp.taglib
Class AddAttributeTag

java.lang.Object
  extended by SimpleTagSupport
      extended by org.apache.tiles.jsp.taglib.AddAttributeTag

public class AddAttributeTag
extends SimpleTagSupport

Adds 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: 927562 $ $Date: 2010-03-25 20:35:34 +0100 (gio, 25 mar 2010) $

Constructor Summary
AddAttributeTag()
           
 
Method Summary
 void doTag()
          
 java.lang.String getExpression()
          Returns the expression to calculate the value from.
 java.lang.String getRole()
          Returns the role to check.
 java.lang.String getType()
          Deprecated. Do not use, ignored.
 java.lang.Object getValue()
          Returns the attribute value.
 void setExpression(java.lang.String expression)
          Sets the expression to calculate the value from.
 void setRole(java.lang.String role)
          Sets the role to check.
 void setType(java.lang.String type)
          Deprecated. Do not use, ignored.
 void setValue(java.lang.Object value)
          Sets the attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddAttributeTag

public AddAttributeTag()
Method Detail

getRole

public java.lang.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(java.lang.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 java.lang.Object getValue()
Returns the attribute value.

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

setValue

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

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

getExpression

public java.lang.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(java.lang.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

@Deprecated
public java.lang.String getType()
Deprecated. Do not use, ignored.

Returns content type: string, template or definition.

Returns:
The attribute type.

setType

@Deprecated
public void setType(java.lang.String type)
Deprecated. Do not use, ignored.

Sets content type: string, template or definition.

Parameters:
type - The attribute type.

doTag

public void doTag()
           throws JspException,
                  java.io.IOException

Throws:
JspException
java.io.IOException