org.apache.struts.taglib.tiles

Class DefinitionTag

Implemented Interfaces:
PutListTagParent, PutTagParent, Serializable

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&gt.
Version:
$Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary

private ComponentDefinition
definition
Template definition
private String
extendsDefinition
Extends attribute value.
private String
id
Definition identifier.
private String
scope
Scope into which definition will be saved.

Fields inherited from class org.apache.struts.taglib.tiles.DefinitionTagSupport

controllerName, controllerType, page, role

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.
String
getExtends()
Get extends (parent) definition name.
String
getId()
Get the ID.
String
getScope()
Get the scope.
void
processNestedTag(PutListTag nestedTag)
Process nested ≶putList> tag.
void
processNestedTag(PutTag nestedTag)
Process nested ≶put> tag.
void
putAttribute(String name, 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(String definitionName)
Set extends (parent) definition name.
void
setId(String id)
Set the ID.
void
setScope(String aScope)
Set the scope.

Methods inherited from class org.apache.struts.taglib.tiles.DefinitionTagSupport

getControllerName, getControllerType, getPage, getRole, getTemplate, release, setController, setControllerClass, setControllerName, setControllerType, setControllerUrl, setPage, setRole, setTemplate

Field Details

definition

private ComponentDefinition definition
Template definition

extendsDefinition

private String extendsDefinition
Extends attribute value.

id

private String id
Definition identifier.

scope

private String scope
Scope into which definition will be saved.

Method Details

doEndTag

public int doEndTag()
            throws JspException
Process the end tag by putting the definition in appropriate context.

doStartTag

public int doStartTag()
            throws JspException
Process the start tag by creating a new definition.

getExtends

public String getExtends()
Get extends (parent) definition name.
Returns:
Name of parent definition.

getId

public String getId()
Get the ID.
Returns:
ID

getScope

public String getScope()
Get the scope.
Returns:
Scope.

processNestedTag

public void processNestedTag(PutListTag nestedTag)
            throws 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

processNestedTag

public void processNestedTag(PutTag nestedTag)
            throws 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

putAttribute

public void putAttribute(String name,
                         Object content)
This method is a convenience for other tags for putting content into the tile definition. Content is already typed by caller.

release

public void release()
Reset member values for reuse. This method calls super.release(), which invokes TagSupport.release(), which typically does nothing.
Overrides:
release in interface DefinitionTagSupport

releaseInternal

protected void releaseInternal()
Release internal references.

setExtends

public void setExtends(String definitionName)
Set extends (parent) definition name.
Parameters:
definitionName - Name of parent definition.

setId

public void setId(String id)
Set the ID.
Parameters:
id - New ID.

setScope

public void setScope(String aScope)
Set the scope.
Parameters:
aScope - Scope.

Copyright B) 2000-2007 - The Apache Software Foundation