Put an attribute in enclosing attribute container tag.
Enclosing attribute container tag can be : <insert> or <definition>.
Exception is thrown if no appropriate tag can be found.
Put tag can have following atributes :
name : Name of the attribute
value | content : value to put as attribute
type : value type. Only valid if value is a String and is set by
value="something" or by a bean.
Possible type are : string (value is used as direct string),
page | template (value is used as a page url to insert),
definition (value is used as a definition name to insert)
direct : Specify if value is to be used as a direct string or as a
page url to insert. This is another way to specify the type. It only apply
if value is set as a string, and type is not present.
beanName : Name of a bean used for setting value. Only valid if value is not set.
If property is specified, value come from bean's property. Otherwise, bean
itself is used for value.
beanProperty : Name of the property used for retrieving value.
beanScope : Scope containing bean.
role : Role to check when 'insert' will be called. If enclosing tag is
<insert>, role is checked immediately. If enclosing tag is
<definition>, role will be checked when this definition will be
inserted.
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.
callParent
protected void callParent()
throws JspException
Find parent tag which must implement AttributeContainer.
computeRealValue
protected void computeRealValue()
throws JspException
Compute real value according to tag attributes.
doAfterBody
public int doAfterBody()
throws JspException
Save the body content of this tag (if any)
doEndTag
public int doEndTag()
throws JspException
Do end tag.
doStartTag
public int doStartTag()
throws JspException
Do start tag.
findEnclosingPutTagParent
protected PutTagParent findEnclosingPutTagParent()
throws JspException
Find parent tag which must implement AttributeContainer.
getBeanName
public String getBeanName()
Get bean name.
getBeanProperty
public String getBeanProperty()
Get bean property.
getBeanScope
public String getBeanScope()
Get bean scope.
getContent
public String getContent()
Get content.
Method added to satisfy Tomcat (bug ?).
getName
public String getName()
Get name.
getRealValue
public Object getRealValue()
throws JspException
Get real value according to tag attribute.
Real value is the value computed after attribute processing.
- Real value.
getRealValueFromBean
protected void getRealValueFromBean()
throws JspException
Extract real value from specified bean.
getRole
public String getRole()
Get role attribute
- The role defined in the tag or
null
.
getType
public String getType()
Get type.
getValue
public String getValue()
Get value.
Method added to satisfy Tomcat (bug ?).
release
public void release()
Release all allocated resources.
releaseInternal
protected void releaseInternal()
Release internal properties.
setBeanName
public void setBeanName(String value)
Set bean name.
setBeanProperty
public void setBeanProperty(String value)
Set bean property.
setBeanScope
public void setBeanScope(String value)
Set bean scope.
setContent
public void setContent(Object value)
Set content.
setContent
public void setContent(String value)
Set content.
Method added to satisfy Tomcat (bug ?).
setDirect
public void setDirect(String isDirect)
Set direct.
Method added for compatibility with JSP1.1.
setName
public void setName(String value)
Set name.
setObjectValue
public void setObjectValue(Object value)
Set property value as an object.
Added because some web containers react badly to value as Object
.
setRole
public void setRole(String role)
Set role attribute.
role
- The role the user must be in to store content.
setType
public void setType(String value)
Set type.
setValue
public void setValue(Object value)
Set value.
setValue
public void setValue(String value)
Set value.
Method added to satisfy Tomcat (bug ?).