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

org.apache.tiles.jsp.taglib
Class AddAttributeTag

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

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()
          
 String getExpression()
          Returns the expression to calculate the value from.
 String getRole()
          Returns the role to check.
 String getType()
          Deprecated. Do not use, ignored.
 Object getValue()
          Returns the attribute value.
 void setExpression(String expression)
          Sets the expression to calculate the value from.
 void setRole(String role)
          Sets the role to check.
 void setType(String type)
          Deprecated. Do not use, ignored.
 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

AddAttributeTag

public AddAttributeTag()
Method Detail

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

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

Returns content type: string, template or definition.

Returns:
The attribute type.

setType

@Deprecated
public void setType(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,
                  IOException

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


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