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 GetAsStringModel

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

    public class GetAsStringModel

extends java.lang.Object

Render the value of the specified template attribute to the current Writer

Retrieve the value of the specified template attribute property, and render it to the current Writer as a String. The usual toString() conversions is applied on found value.

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

Constructor Summary
`GetAsStringModel(AttributeResolver attributeResolver)` Constructor.

Method Summary
`void` | `end(ArrayStack<java.lang.Object> composeStack, TilesContainer container, java.io.Writer writer, boolean ignore, java.lang.Object... requestItems)` Ends the operation.
`void` | `execute(TilesContainer container, java.io.Writer writer, boolean ignore, java.lang.String preparer, java.lang.String role, java.lang.Object defaultValue, java.lang.String defaultValueRole, java.lang.String defaultValueType, java.lang.String name, Attribute value, java.lang.Object... requestItems)` Executes the operation.
`void` | `start(ArrayStack<java.lang.Object> composeStack, TilesContainer container, boolean ignore, java.lang.String preparer, java.lang.String role, java.lang.Object defaultValue, java.lang.String defaultValueRole, java.lang.String defaultValueType, java.lang.String name, Attribute value, java.lang.Object... requestItems)` Starts the operation.

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

Constructor Detail

### GetAsStringModel

    public GetAsStringModel(AttributeResolver attributeResolver)

  Constructor.

  Parameters:
    `attributeResolver` - The attribute resolver to use.
  Since:
    2.2.0

Method Detail

### start

    public void start(ArrayStack<java.lang.Object> composeStack,
                      TilesContainer container,
                      boolean ignore,
                      java.lang.String preparer,
                      java.lang.String role,
                      java.lang.Object defaultValue,
                      java.lang.String defaultValueRole,
                      java.lang.String defaultValueType,
                      java.lang.String name,
                      Attribute value,
                      java.lang.Object... requestItems)

  Starts the operation.

  Parameters:
    `composeStack` - The compose stack,
    `container` - The Tiles container to use.
    `ignore` - If `true`, if an exception happens during rendering, of if the attribute is null, the problem will be ignored.
    `preparer` - The preparer to invoke before rendering the attribute.
    `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.
    `defaultValue` - The default value of the attribute. To use only if the attribute was not computed.
    `defaultValueRole` - The default comma-separated list of roles. To use only if the attribute was not computed.
    `defaultValueType` - The default type of the attribute. To use only if the attribute was not computed.
    `name` - The name of the attribute.
    `value` - The attribute to use immediately, if not null.
    `requestItems` - The request objects.
  Since:
    2.2.0

### end

    public void end(ArrayStack<java.lang.Object> composeStack,
                    TilesContainer container,
                    java.io.Writer writer,
                    boolean ignore,
                    java.lang.Object... requestItems)
             throws java.io.IOException

  Ends the operation.

  Parameters:
    `composeStack` - The compose stack,
    `container` - The Tiles container to use.
    `writer` - The writer into which the attribute will be written.
    `ignore` - If `true`, if an exception happens during rendering, of if the attribute is null, the problem will be ignored.
    `requestItems` - The request objects.
  Throws:
    `java.io.IOException` - If an I/O error happens during rendering.

### execute

    public void execute(TilesContainer container,
                        java.io.Writer writer,
                        boolean ignore,
                        java.lang.String preparer,
                        java.lang.String role,
                        java.lang.Object defaultValue,
                        java.lang.String defaultValueRole,
                        java.lang.String defaultValueType,
                        java.lang.String name,
                        Attribute value,
                        java.lang.Object... requestItems)
                 throws java.io.IOException

  Executes the operation.

  Parameters:
    `container` - The Tiles container to use.
    `writer` - The writer into which the attribute will be written.
    `ignore` - If `true`, if an exception happens during rendering, of if the attribute is null, the problem will be ignored.
    `preparer` - The preparer to invoke before rendering the attribute.
    `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.
    `defaultValue` - The default value of the attribute. To use only if the attribute was not computed.
    `defaultValueRole` - The default comma-separated list of roles. To use only if the attribute was not computed.
    `defaultValueType` - The default type of the attribute. To use only if the attribute was not computed.
    `name` - The name of the attribute.
    `value` - The attribute to use immediately, if not null.
    `requestItems` - The request objects.
  Throws:
    `java.io.IOException` - If an I/O error happens during rendering.
  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.