org.apache.struts.taglib.tiles

Class GetAttributeTag

public class GetAttributeTag extends TagSupport implements ComponentConstants

Retrieve the value of the specified component/template attribute property, and render it to the current JspWriter as a String. The usual toString() conversion is applied on the found value.
Field Summary
Stringattribute
booleanisErrorIgnored
Do we ignore error if attribute is not found.
Stringrole
Role attribute
Constructor Summary
GetAttributeTag()
Default constructor.
Method Summary
intdoEndTag()
Close tag.
StringgetAttribute()
Get attribute.
booleangetIgnore()
Get ignore flag.
StringgetName()
Get Name.
StringgetRole()
Get role.
voidrelease()
Release all allocated resources.
voidsetAttribute(String attribute)
Set attribute.
voidsetIgnore(boolean ignore)
Set ignoring flag when attribute is not found.
voidsetName(String value)
Set Name.
voidsetRole(String role)
Set role.

Field Detail

attribute

private String attribute

isErrorIgnored

private boolean isErrorIgnored
Do we ignore error if attribute is not found. Default value is false, which will throw an exception.

role

private String role
Role attribute

Constructor Detail

GetAttributeTag

public GetAttributeTag()
Default constructor.

Method Detail

doEndTag

public int doEndTag()
Close tag.

Throws: JspException On error processing tag.

getAttribute

public String getAttribute()
Get attribute.

Returns: Attribute.

getIgnore

public boolean getIgnore()
Get ignore flag.

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

getName

public String getName()
Get Name. Set as getAttribute().

Returns: Attribute.

getRole

public String getRole()
Get role.

Returns: Role.

release

public void release()
Release all allocated resources.

setAttribute

public void setAttribute(String attribute)
Set attribute.

Parameters: attribute Attribute.

setIgnore

public void setIgnore(boolean ignore)
Set ignoring flag when attribute is not found.

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

setName

public void setName(String value)
Set Name. Same as setAttribute().

Parameters: value Attribute.

setRole

public void setRole(String role)
Set role.

Parameters: role The role the user must be in to store content.

Copyright B) 2000-2008 - The Apache Software Foundation