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.struts.taglib.tiles
Class DefinitionTag

    java.lang.Object
      |
      +--javax.servlet.jsp.tagext.TagSupport
            |
            +--org.apache.struts.taglib.tiles.DefinitionTagSupport
                  |
                  +--org.apache.struts.taglib.tiles.DefinitionTag

All Implemented Interfaces:
  PutListTagParent, PutTagParent, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class DefinitionTag
extends DefinitionTagSupport
implements PutTagParent, PutListTagParent

This is the tag handler for <tiles:definition>, which defines a tiles (or template / component). Definition is put in requested context and can be used in <tiles:insert>.

Version:
  $Revision: 1.1 $ $Date: 2003-08-22 09:34:00 +0100 (Fri, 22 Aug 2003) $
Author:
  Cedric Dumoulin
See Also:
  Serialized Form

Field Summary
`private ComponentDefinition` | `definition` Template definition
`private java.lang.String` | `extendsDefinition` Extends attribute value.
`private java.lang.String` | `id` Definition identifier.
`private java.lang.String` | `scope` Scope into which definition will be saved.

Fields inherited from class org.apache.struts.taglib.tiles.DefinitionTagSupport
`controllerName, controllerType, page, role`

Fields inherited from class javax.servlet.jsp.tagext.TagSupport
`pageContext`

Fields inherited from interface javax.servlet.jsp.tagext.Tag
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

Constructor Summary
`DefinitionTag()`

Method Summary
`int` | `doEndTag()` Process the end tag by putting the definition in appropriate context.
`int` | `doStartTag()` Process the start tag by creating a new definition.
`java.lang.String` | `getExtends()` Get `extends` (parent) definition name.
`java.lang.String` | `getId()` Get the ID.
`java.lang.String` | `getScope()` Get the scope.
`void` | `processNestedTag(PutListTag nestedTag)` Process nested ≶putList> tag.
`void` | `processNestedTag(PutTag nestedTag)` Process nested ≶put> tag.
`void` | `putAttribute(java.lang.String name, java.lang.Object content)` This method is a convenience for other tags for putting content into the tile definition.
`void` | `release()` Reset member values for reuse.
`protected void` | `releaseInternal()` Release internal references.
`void` | `setExtends(java.lang.String definitionName)` Set `extends` (parent) definition name.
`void` | `setId(java.lang.String id)` Set the ID.
`void` | `setScope(java.lang.String aScope)` Set the scope.

Methods inherited from class org.apache.struts.taglib.tiles.DefinitionTagSupport
`getControllerName, getControllerType, getPage, getRole, getTemplate, setController, setControllerClass, setControllerName, setControllerType, setControllerUrl, setPage, setRole, setTemplate`

Methods inherited from class javax.servlet.jsp.tagext.TagSupport
`findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue`

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

Field Detail

### id

    private java.lang.String id

  Definition identifier.

### scope

    private java.lang.String scope

  Scope into which definition will be saved.

### extendsDefinition

    private java.lang.String extendsDefinition

  Extends attribute value.

### definition

    private ComponentDefinition definition

  Template definition

Constructor Detail

### DefinitionTag

    public DefinitionTag()

Method Detail

### release

    public void release()

  Reset member values for reuse. This method calls super.release(), which invokes TagSupport.release(), which typically does nothing.

  Specified by:
    `release` in interface `javax.servlet.jsp.tagext.Tag`
  Overrides:
    `release` in class `DefinitionTagSupport`

### releaseInternal

    protected void releaseInternal()

  Release internal references.

### putAttribute

    public void putAttribute(java.lang.String name,
                             java.lang.Object content)

  This method is a convenience for other tags for putting content into the tile definition. Content is already typed by caller.

### processNestedTag

    public void processNestedTag(PutTag nestedTag)
                          throws javax.servlet.jsp.JspException

  Process nested ≶put> tag. Method is called from nested ≶put> tags. Nested list is added to current list. If role is defined, nested attribute is wrapped into an untyped definition containing attribute value and role.

  Specified by:
    `processNestedTag` in interface `PutTagParent`
  Parameters:
    `nestedTag` - Nested tag to process.
    `javax.servlet.jsp.JspException`

### processNestedTag

    public void processNestedTag(PutListTag nestedTag)
                          throws javax.servlet.jsp.JspException

  Process nested ≶putList> tag. Method is called from nested ≶putList> tags. Nested list is added to current list. If role is defined, nested attribute is wrapped into an untyped definition containing attribute value and role.

  Specified by:
    `processNestedTag` in interface `PutListTagParent`
  Parameters:
    `nestedTag` - Nested PutTag defining the attribute.
    `javax.servlet.jsp.JspException`

### getId

    public java.lang.String getId()

  Get the ID.

  Overrides:
    `getId` in class `javax.servlet.jsp.tagext.TagSupport`
  Returns:
    ID

### setId

    public void setId(java.lang.String id)

  Set the ID.

  Overrides:
    `setId` in class `javax.servlet.jsp.tagext.TagSupport`
  Parameters:
    `id` - New ID.

### getScope

    public java.lang.String getScope()

  Get the scope.

  Returns:
    Scope.

### setScope

    public void setScope(java.lang.String aScope)

  Set the scope.

  Parameters:
    `aScope` - Scope.

### setExtends

    public void setExtends(java.lang.String definitionName)

  Set `extends` (parent) definition name.

  Parameters:
    `definitionName` - Name of parent definition.

### getExtends

    public java.lang.String getExtends()

  Get `extends` (parent) definition name.

  Returns:
    Name of parent definition.

### doStartTag

    public int doStartTag()
                   throws javax.servlet.jsp.JspException

  Process the start tag by creating a new definition.

  Specified by:
    `doStartTag` in interface `javax.servlet.jsp.tagext.Tag`
  Overrides:
    `doStartTag` in class `javax.servlet.jsp.tagext.TagSupport`
  Throws:
    `javax.servlet.jsp.JspException` - On errors processing tag.

### doEndTag

    public int doEndTag()
                 throws javax.servlet.jsp.JspException

  Process the end tag by putting the definition in appropriate context.

  Specified by:
    `doEndTag` in interface `javax.servlet.jsp.tagext.Tag`
  Overrides:
    `doEndTag` in class `javax.servlet.jsp.tagext.TagSupport`
  Throws:
    `javax.servlet.jsp.JspException` - On errors processing tag.

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 © 2000-2003 - Apache Software Foundation