org.apache.tiles.taglib
Class PutAttributeTag

Package class diagram package PutAttributeTag
java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.apache.tiles.taglib.ContainerTagSupport
              extended by org.apache.tiles.taglib.PutAttributeTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, ComponentConstants
Direct Known Subclasses:
PutListAttributeTag

public class PutAttributeTag
extends ContainerTagSupport
implements ComponentConstants

Put an attribute in enclosing attribute container tag.

Enclosing attribute container tag can be :

(or any other tag which implements the PutAttributeTagParent interface. Exception is thrown if no appropriate tag can be found.

Put tag can have following atributes :

Value can also come from tag body. Tag body is taken into account only if value is not set by one of the tag attributes. In this case Attribute type is "string", unless tag body define another type.

See Also:
Serialized Form

Field Summary
protected  java.lang.String name
          Name of attribute to put in component context.
 
Fields inherited from class org.apache.tiles.taglib.ContainerTagSupport
componentContext, container
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface org.apache.tiles.taglib.ComponentConstants
COMPONENT_CONTEXT_STACK, COMPONENT_SCOPE, EXCEPTION_KEY, LOCALE_KEY
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
PutAttributeTag()
           
 
Method Summary
 int doAfterBody()
          Save the body content of this tag (if any)
protected  void endContext(javax.servlet.jsp.PageContext context)
           
protected  void execute()
           
 java.lang.String getName()
           
 java.lang.String getType()
           
 java.lang.Object getValue()
           
 void release()
          Release all allocated resources.
 void setName(java.lang.String name)
           
 void setType(java.lang.String type)
           
 void setValue(java.lang.Object value)
           
protected  void startContext(javax.servlet.jsp.PageContext context)
           
 
Methods inherited from class org.apache.tiles.taglib.ContainerTagSupport
doEndTag, doStartTag, getRole, isAccessAllowed, setRole
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
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
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

name

protected java.lang.String name
Name of attribute to put in component context.

Constructor Detail

PutAttributeTag

public PutAttributeTag()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object value)

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

release

public void release()
Release all allocated resources.

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

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Save the body content of this tag (if any)

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

startContext

protected void startContext(javax.servlet.jsp.PageContext context)
Overrides:
startContext in class ContainerTagSupport

endContext

protected void endContext(javax.servlet.jsp.PageContext context)
Overrides:
endContext in class ContainerTagSupport

execute

protected void execute()
                throws javax.servlet.jsp.JspException
Specified by:
execute in class ContainerTagSupport
Throws:
javax.servlet.jsp.JspException