org.apache.struts.taglib.tiles

Class DefinitionTag

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

Field Summary
ComponentDefinitiondefinition
Template definition
StringextendsDefinition
Extends attribute value.
Stringid
Definition identifier.
Stringscope
Scope into which definition will be saved.
Method Summary
intdoEndTag()
Process the end tag by putting the definition in appropriate context.
intdoStartTag()
Process the start tag by creating a new definition.
StringgetExtends()
Get extends (parent) definition name.
StringgetId()
Get the ID.
StringgetScope()
Get the scope.
voidprocessNestedTag(PutTag nestedTag)
Process nested ≶put> tag.
voidprocessNestedTag(PutListTag nestedTag)
Process nested ≶putList> tag.
voidputAttribute(String name, Object content)
This method is a convenience for other tags for putting content into the tile definition.
voidrelease()
Reset member values for reuse.
protected voidreleaseInternal()
Release internal references.
voidsetExtends(String definitionName)
Set extends (parent) definition name.
voidsetId(String id)
Set the ID.
voidsetScope(String aScope)
Set the scope.

Field Detail

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 Detail

doEndTag

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

Throws: JspException On errors processing tag.

doStartTag

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

Throws: JspException On errors processing tag.

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(PutTag nestedTag)
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.

processNestedTag

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

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.

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-2008 - The Apache Software Foundation