Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tiles.jsp.taglib
Class InsertAttributeTag

    java.lang.Object
      javax.servlet.jsp.tagext.SimpleTagSupport
          org.apache.tiles.jsp.taglib.InsertAttributeTag

All Implemented Interfaces:
  javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag

    public class InsertAttributeTag

extends javax.servlet.jsp.tagext.SimpleTagSupport

This is the tag handler for <tiles:attribute>, which defines an attribute. If the attribute value is a template or a definition, its attributes and its template can be overridden.

Version:
  $Rev: 929598 $ $Date: 2010-03-31 17:53:02 +0200 (mer, 31 mar 2010) $

Constructor Summary
`InsertAttributeTag()`

Method Summary
`void` | `doTag()`
`java.lang.Object` | `getDefaultValue()` Returns the default value, that is evaluated only if `value` is null and the attribute with the associated `name` is null.
`java.lang.String` | `getDefaultValueRole()` Returns the role to check for the default value.
`java.lang.String` | `getDefaultValueType()` Returns the default value type.
`java.lang.String` | `getName()` Returns the name of the attribute.
`java.lang.String` | `getPreparer()` Returns the preparer name.
`java.lang.String` | `getRole()` Returns the role to check.
`java.lang.Object` | `getValue()` Get the value.
`boolean` | `isFlush()` Returns the flush flag.
`boolean` | `isIgnore()` Returns the ignore flag.
`void` | `setDefaultValue(java.lang.Object defaultValue)` Sets the default value, that is evaluated only if `value` is null and the attribute with the associated `name` is null.
`void` | `setDefaultValueRole(java.lang.String defaultValueRole)` Sets the role to check for the default value.
`void` | `setDefaultValueType(java.lang.String defaultValueType)` Sets the default value type.
`void` | `setFlush(boolean flush)` Sets the flush flag.
`void` | `setIgnore(boolean ignore)` Sets the ignore flag.
`void` | `setName(java.lang.String value)` Sets the name of the attribute.
`void` | `setPreparer(java.lang.String preparer)` Sets the preparer name.
`void` | `setRole(java.lang.String role)` Sets the role to check.
`void` | `setValue(java.lang.Object value)` Set the 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

### InsertAttributeTag

    public InsertAttributeTag()

Method Detail

### setName

    public void setName(java.lang.String value)

  Sets the name of the attribute.

  Parameters:
    `value` - The name of the attribute.

### getName

    public java.lang.String getName()

  Returns the name of the attribute.

  Returns:
    The name of the attribute.

### getValue

    public java.lang.Object getValue()

  Get the value.

  Returns:
    The value.

### setValue

    public void setValue(java.lang.Object value)

  Set the value.

  Parameters:
    `value` - The new value

### getDefaultValue

    public java.lang.Object getDefaultValue()

  Returns the default value, that is evaluated only if `value` is null and the attribute with the associated `name` is null.

  Returns:
    The default value.

### setDefaultValue

    public void setDefaultValue(java.lang.Object defaultValue)

  Sets the default value, that is evaluated only if `value` is null and the attribute with the associated `name` is null.

  Parameters:
    `defaultValue` - The default value to set.

### getDefaultValueType

    public java.lang.String getDefaultValueType()

  Returns the default value type. It will be used only if `getDefaultValue()` is a string.

  Returns:
    The default value type.

### setDefaultValueType

    public void setDefaultValueType(java.lang.String defaultValueType)

  Sets the default value type. To be used in conjunction with `setDefaultValue(Object)` when passing a string.

  Parameters:
    `defaultValueType` - The default value type.

### getDefaultValueRole

    public java.lang.String getDefaultValueRole()

  Returns the role to check for the default value. If the user is in the specified role, the default value is taken into account; otherwise, it is ignored (skipped).

  Returns:
    The default value role.

### setDefaultValueRole

    public void setDefaultValueRole(java.lang.String defaultValueRole)

  Sets the role to check for the default value. If the user is in the specified role, the default value is taken into account; otherwise, it is ignored (skipped).

  Parameters:
    `defaultValueRole` - The default value role.

### 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.
  Since:
    2.1.1

### 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.
  Since:
    2.1.1

### getPreparer

    public java.lang.String getPreparer()

  Returns the preparer name.

  Returns:
    The preparer name.
  Since:
    2.1.1

### setPreparer

    public void setPreparer(java.lang.String preparer)

  Sets the preparer name.

  Parameters:
    `preparer` - The preparer name.
  Since:
    2.1.1

### isFlush

    public boolean isFlush()

  Returns the flush flag. If `true`, current page out stream is flushed after insertion.

  Returns:
    The flush flag.
  Since:
    2.1.1

### setFlush

    public void setFlush(boolean flush)

  Sets the flush flag. If `true`, current page out stream is flushed after insertion.

  Parameters:
    `flush` - The flush flag.
  Since:
    2.1.1

### isIgnore

    public boolean isIgnore()

  Returns the ignore flag. If it is set to true, and the attribute specified by the name does not exist, simply return without writing anything. The default value is false, which will cause a runtime exception to be thrown.

  Returns:
    The ignore flag.
  Since:
    2.1.1

### setIgnore

    public void setIgnore(boolean ignore)

  Sets the ignore flag. If this attribute is set to true, and the attribute specified by the name does not exist, simply return without writing anything. The default value is false, which will cause a runtime exception to be thrown.

  Parameters:
    `ignore` - The ignore flag.
  Since:
    2.1.1

### doTag

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

  Specified by:
    `doTag` in interface `javax.servlet.jsp.tagext.SimpleTag`
  Overrides:
    `doTag` in class `javax.servlet.jsp.tagext.SimpleTagSupport`
  Throws:
    `javax.servlet.jsp.JspException`
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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