org.apache.tiles.taglib
Class AttributeTagSupport

Package class diagram package AttributeTagSupport
java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.tiles.taglib.AttributeTagSupport
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
ImportAttributeTag, UseAttributeTag

public abstract class AttributeTagSupport
extends javax.servlet.jsp.tagext.TagSupport

Support for Scoped tags.

See Also:
Serialized Form

Field Summary
protected  org.apache.tiles.ComponentAttribute attribute
           
protected  org.apache.tiles.ComponentContext componentContext
           
protected  org.apache.tiles.TilesContainer container
           
protected  boolean ignore
           
protected  java.lang.String name
           
protected  int scope
           
protected  java.lang.String scopeName
           
 
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
AttributeTagSupport()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
abstract  void execute()
           
 boolean getIgnore()
          Get ignore flag.
 java.lang.String getName()
          Get the name.
 java.lang.String getScope()
          Get scope.
static int getScope(java.lang.String scopeName)
          Converts the scope name into its corresponding PageContext constant value.
 int getScopeId()
          Get scope value from string value
 void release()
           
 void setIgnore(boolean ignore)
          Set ignore flag.
 void setName(java.lang.String name)
          Set the name.
 void setScope(java.lang.String scope)
          Set the scope.
 
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
 

Field Detail

scopeName

protected java.lang.String scopeName

scope

protected int scope

name

protected java.lang.String name

ignore

protected boolean ignore

container

protected org.apache.tiles.TilesContainer container

componentContext

protected org.apache.tiles.ComponentContext componentContext

attribute

protected org.apache.tiles.ComponentAttribute attribute
Constructor Detail

AttributeTagSupport

public AttributeTagSupport()
Method Detail

setScope

public void setScope(java.lang.String scope)
Set the scope.

Parameters:
scope - Scope.

getScope

public java.lang.String getScope()
Get scope.

Returns:
Scope.

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException

execute

public abstract void execute()
                      throws javax.servlet.jsp.JspException,
                             java.io.IOException
Throws:
javax.servlet.jsp.JspException
java.io.IOException

doEndTag

public int doEndTag()
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport

getScopeId

public int getScopeId()
               throws javax.servlet.jsp.JspException
Get scope value from string value

Returns:
Scope as an int, or defaultValue if scope is null.
Throws:
javax.servlet.jsp.JspException - Scope name is not recognized as a valid scope.

getScope

public static int getScope(java.lang.String scopeName)
                    throws javax.servlet.jsp.JspException
Converts the scope name into its corresponding PageContext constant value.

Parameters:
scopeName - Can be "page", "request", "session", or "application" in any case.
Returns:
The constant representing the scope (ie. PageContext.REQUEST_SCOPE).
Throws:
javax.servlet.jsp.JspException - if the scopeName is not a valid name.

getName

public java.lang.String getName()
Get the name.

Returns:
Name.

setName

public void setName(java.lang.String name)
Set the name.

Parameters:
name - The new name

setIgnore

public void setIgnore(boolean ignore)
Set ignore flag.

Parameters:
ignore - default: false: Exception is thrown when attribute is not found, set to true to ignore missing attributes silently

getIgnore

public boolean getIgnore()
Get ignore flag.

Returns:
default: false: Exception is thrown when attribute is not found, set to true to ignore missing attributes silently