This project has retired. For details please refer to its Attic page.
DefinitionTag (Tiles 2 2.1.4 API)

org.apache.tiles.jsp.taglib.definition
Class DefinitionTag

Package class diagram package DefinitionTag
java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.tiles.jsp.taglib.TilesTag
          extended by org.apache.tiles.jsp.taglib.definition.DefinitionTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag, TryCatchFinally, PutAttributeTagParent, PutListAttributeTagParent

public class DefinitionTag
extends TilesTag
implements PutAttributeTagParent, PutListAttributeTagParent

This is the tag handler for <tiles:definition>, which creates a custom definition. If the configured container is a MutableTilesContainer, this newly created definition can be used in <tiles:insertDefinition>.

Version:
$Rev: 736275 $ $Date: 2009-01-21 10:58:20 +0100 (mer, 21 gen 2009) $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
DefinitionTag()
           
 
Method Summary
protected  void callParent()
          Find parent tag which must implement DefinitionTagParent.
 int doEndTag()
          
 int doStartTag()
          
protected  DefinitionTagParent findEnclosingDefinitionTagParent()
          Find parent tag which must implement AttributeContainer.
 String getExtends()
          Returns the (optional) definition name that this definition extends.
 String getName()
          Returns the name of the definition to configure.
 String getPreparer()
          Returns the definition view preparer.
 String getRole()
          Returns the role to check when rendering this definition.
 String getTemplate()
          Returns the template URI of the definition.
 void processNestedTag(PutAttributeTag nestedTag)
          Reset member values for reuse.
 void processNestedTag(PutListAttributeTag nestedTag)
          Process the nested tag.
protected  void reset()
          Release any per-invocation resources, resetting any resources or state that should be cleared between successive invocations of Tag.doEndTag() and Tag.doStartTag().
 void setExtends(String extend)
          Sets the (optional) definition name that this definition extends.
 void setName(String name)
          Sets the name of the definition to configure.
 void setPreparer(String preparer)
          Sets the definition view preparer.
 void setRole(String role)
          Sets the role to check when rendering this definition.
 void setTemplate(String template)
          Sets the template URI of the definition.
 
Methods inherited from class org.apache.tiles.jsp.taglib.TilesTag
doCatch, doFinally, release
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefinitionTag

public DefinitionTag()
Method Detail

getName

public String getName()
Returns the name of the definition to configure.

Returns:
The definition name.

setName

public void setName(String name)
Sets the name of the definition to configure.

Parameters:
name - The definition name.

getTemplate

public String getTemplate()
Returns the template URI of the definition.

Returns:
The template URI.

setTemplate

public void setTemplate(String template)
Sets the template URI of the definition.

Parameters:
template - The template URI.

getExtends

public String getExtends()
Returns the (optional) definition name that this definition extends.

Returns:
The extending definition name.

setExtends

public void setExtends(String extend)
Sets the (optional) definition name that this definition extends.

Parameters:
extend - The extending definition name.

getRole

public String getRole()
Returns the role to check when rendering this definition.

Returns:
The role to check.

setRole

public void setRole(String role)
Sets the role to check when rendering this definition.

Parameters:
role - The role to check.

getPreparer

public String getPreparer()
Returns the definition view preparer.

Returns:
The view preparer name.

setPreparer

public void setPreparer(String preparer)
Sets the definition view preparer.

Parameters:
preparer - The view preparer name.

reset

protected void reset()
Release any per-invocation resources, resetting any resources or state that should be cleared between successive invocations of Tag.doEndTag() and Tag.doStartTag().

Overrides:
reset in class TilesTag

doStartTag

public int doStartTag()
               throws TilesJspException

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class TagSupport
Throws:
TilesJspException

doEndTag

public int doEndTag()
             throws TilesJspException

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class TagSupport
Throws:
TilesJspException

processNestedTag

public void processNestedTag(PutAttributeTag nestedTag)
                      throws TilesJspException
Reset member values for reuse. This method calls super.release(), which invokes TagSupport.release(), which typically does nothing.

Specified by:
processNestedTag in interface PutAttributeTagParent
Parameters:
nestedTag - The nested PutAttributeTag
Throws:
TilesJspException - Never thrown, it's here for API compatibility.

processNestedTag

public void processNestedTag(PutListAttributeTag nestedTag)
Process the nested tag.

Specified by:
processNestedTag in interface PutListAttributeTagParent
Parameters:
nestedTag - Nested tag to process.

callParent

protected void callParent()
                   throws TilesJspException
Find parent tag which must implement DefinitionTagParent.

Throws:
TilesJspException - If we can't find an appropriate enclosing tag.
Since:
2.1.0

findEnclosingDefinitionTagParent

protected DefinitionTagParent findEnclosingDefinitionTagParent()
                                                        throws TilesJspException
Find parent tag which must implement AttributeContainer.

Returns:
The parent tag.
Throws:
TilesJspException - If we can't find an appropriate enclosing tag.
Since:
2.1.0


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.