org.apache.struts.taglib.tiles

Class GetAttributeTag

Implemented Interfaces:
ComponentConstants

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

private String
attribute
private boolean
isErrorIgnored
Do we ignore error if attribute is not found.
private String
role
Role attribute

Fields inherited from interface org.apache.struts.taglib.tiles.ComponentConstants

COMPONENT_CONTEXT, COMPONENT_SCOPE, EXCEPTION_KEY, LOCALE_KEY

Constructor Summary

GetAttributeTag()
Default constructor.

Method Summary

int
doEndTag()
Close tag.
String
getAttribute()
Get attribute.
boolean
getIgnore()
Get ignore flag.
String
getName()
Get Name.
String
getRole()
Get role.
void
release()
Release all allocated resources.
void
setAttribute(String attribute)
Set attribute.
void
setIgnore(boolean ignore)
Set ignoring flag when attribute is not found.
void
setName(String value)
Set Name.
void
setRole(String role)
Set role.

Field Details

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 Details

GetAttributeTag

public GetAttributeTag()
Default constructor.

Method Details

doEndTag

public int doEndTag()
            throws JspException
Close 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-2007 - The Apache Software Foundation