Package org.apache.tiles.web.jsp.taglib

# Class AddAttributeTag

java.lang.Object
jakarta.servlet.jsp.tagext.SimpleTagSupport
org.apache.tiles.web.jsp.taglib.AddAttributeTag

All Implemented Interfaces:
  `jakarta.servlet.jsp.tagext.JspTag`, `jakarta.servlet.jsp.tagext.SimpleTag`

public class AddAttributeTag extends jakarta.servlet.jsp.tagext.SimpleTagSupport

Add an element to the surrounding list. Equivalent to 'putAttribute', but for list element.

Add an element to the surrounding list. This tag can only be used inside 'putListAttribute' or 'addListAttribute' tags. Value can come from a direct assignment (value="aValue")

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AddAttributeTag()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `doTag()`
  `String`
  `getExpression()`
  Getter for expression property.
  `String`
  `getRole()`
  Getter for role property.
  `String`
  `getType()`
  Getter for type property.
  `Object`
  `getValue()`
  Getter for value property.
  `void`
  `setExpression(String expression)`
  Setter for expression 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 jakarta.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 Details

  - ### AddAttributeTag

    public AddAttributeTag()

- ## Method Details

  - ### 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.

  - ### doTag

    public void doTag() throws jakarta.servlet.jsp.JspException, IOException
    Specified by:
      `doTag` in interface `jakarta.servlet.jsp.tagext.SimpleTag`
    Overrides:
      `doTag` in class `jakarta.servlet.jsp.tagext.SimpleTagSupport`
    Throws:
      `jakarta.servlet.jsp.JspException`
      `IOException`