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.template
Class PutAttributeModel

    java.lang.Object
      org.apache.tiles.template.PutAttributeModel

    public class PutAttributeModel

extends java.lang.Object

Put an attribute in enclosing attribute container tag.

Enclosing attribute container tag can be :

- <initContainer>
- <definition>
- <insertAttribute>
- <insertDefinition>
- <putListAttribute>

(or any other tag which implements the `PutAttributeTagParent` interface. Exception is thrown if no appropriate tag can be found.

Put tag can have following atributes :

- name : Name of the attribute
- value : value to put as attribute
- type : value type. Possible type are : string (value is used as direct string), template (value is used as a page url to insert), definition (value is used as a definition name to insert), object (value is used as it is)
- role : Role to check when 'insertAttribute' will be called.

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.

Since:
  2.2.0
Version:
  $Rev: 797765 $ $Date: 2009-07-25 15:20:26 +0200 (sab, 25 lug 2009) $

Constructor Summary
`PutAttributeModel()`

Method Summary
`void` | `end(TilesContainer container, ArrayStack<java.lang.Object> composeStack, java.lang.String name, java.lang.Object value, java.lang.String expression, java.lang.String body, java.lang.String role, java.lang.String type, boolean cascade, java.lang.Object... requestItems)` Ends the operation.
`void` | `execute(TilesContainer container, ArrayStack<java.lang.Object> composeStack, java.lang.String name, java.lang.Object value, java.lang.String expression, java.lang.String body, java.lang.String role, java.lang.String type, boolean cascade, java.lang.Object... requestItems)` Executes the operation.
`void` | `start(ArrayStack<java.lang.Object> composeStack)` Starts the operation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PutAttributeModel

    public PutAttributeModel()

Method Detail

### start

    public void start(ArrayStack<java.lang.Object> composeStack)

  Starts the operation.

  Parameters:
    `composeStack` - The compose stack.
  Since:
    2.2.0

### end

    public void end(TilesContainer container,
                    ArrayStack<java.lang.Object> composeStack,
                    java.lang.String name,
                    java.lang.Object value,
                    java.lang.String expression,
                    java.lang.String body,
                    java.lang.String role,
                    java.lang.String type,
                    boolean cascade,
                    java.lang.Object... requestItems)

  Ends the operation.

  Parameters:
    `container` - The Tiles container to use.
    `composeStack` - The composing stack.
    `name` - The name of the attribute to put.
    `value` - The value of the attribute. Use this parameter, or expression, or body.
    `expression` - The expression to calculate the value from. Use this parameter, or value, or body.
    `body` - The body of the tag. Use this parameter, or value, or expression.
    `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.
    `type` - The type (renderer) of the attribute.
    `cascade` - If `true` the attribute will be cascaded to all nested attributes.
    `requestItems` - The request objects.
  Since:
    2.2.0

### execute

    public void execute(TilesContainer container,
                        ArrayStack<java.lang.Object> composeStack,
                        java.lang.String name,
                        java.lang.Object value,
                        java.lang.String expression,
                        java.lang.String body,
                        java.lang.String role,
                        java.lang.String type,
                        boolean cascade,
                        java.lang.Object... requestItems)

  Executes the operation.

  Parameters:
    `container` - The Tiles container to use.
    `composeStack` - The composing stack.
    `name` - The name of the attribute to put.
    `value` - The value of the attribute. Use this parameter, or expression, or body.
    `expression` - The expression to calculate the value from. Use this parameter, or value, or body.
    `body` - The body of the tag. Use this parameter, or value, or expression.
    `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.
    `type` - The type (renderer) of the attribute.
    `cascade` - If `true` the attribute will be cascaded to all nested attributes.
    `requestItems` - The request objects.
  Since:
    2.2.0

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.