org.apache.struts.taglib.bean

Class DefineTag

public class DefineTag extends BodyTagSupport

Define a scripting variable based on the value(s) of the specified bean property.

Version: $Rev: 190780 $ $Date: 2005-06-15 18:09:02 +0100 (Wed, 15 Jun 2005) $

Field Summary
protected Stringbody
The body content of this tag (if any).
protected Stringid
The name of the scripting variable that will be exposed as a page scope attribute.
static Loglog
Commons logging instance.
protected static MessageResourcesmessages
The message resources for this package.
protected Stringname
The name of the bean owning the property to be exposed.
protected Stringproperty
The name of the property to be retrieved.
protected Stringscope
The scope within which to search for the specified bean.
protected StringtoScope
The scope within which the newly defined bean will be creatd.
protected Stringtype
The fully qualified Java class name of the value to be exposed.
protected Stringvalue
The (String) value to which the defined bean will be set.
Method Summary
intdoAfterBody()
Save the body content of this tag (if any), or throw a JspException if the value was already defined.
intdoEndTag()
Retrieve the required property and expose it as a scripting variable.
intdoStartTag()
Check if we need to evaluate the body of the tag
StringgetId()
StringgetName()
StringgetProperty()
StringgetScope()
StringgetToScope()
StringgetType()
StringgetValue()
voidrelease()
Release all allocated resources.
voidsetId(String id)
voidsetName(String name)
voidsetProperty(String property)
voidsetScope(String scope)
voidsetToScope(String toScope)
voidsetType(String type)
voidsetValue(String value)

Field Detail

body

protected String body
The body content of this tag (if any).

id

protected String id
The name of the scripting variable that will be exposed as a page scope attribute.

log

private static final Log log
Commons logging instance.

messages

protected static MessageResources messages
The message resources for this package.

name

protected String name
The name of the bean owning the property to be exposed.

property

protected String property
The name of the property to be retrieved.

scope

protected String scope
The scope within which to search for the specified bean.

toScope

protected String toScope
The scope within which the newly defined bean will be creatd.

type

protected String type
The fully qualified Java class name of the value to be exposed.

value

protected String value
The (String) value to which the defined bean will be set.

Method Detail

doAfterBody

public int doAfterBody()
Save the body content of this tag (if any), or throw a JspException if the value was already defined.

Throws: JspException if value was defined by an attribute

doEndTag

public int doEndTag()
Retrieve the required property and expose it as a scripting variable.

Throws: JspException if a JSP exception has occurred

doStartTag

public int doStartTag()
Check if we need to evaluate the body of the tag

Throws: JspException if a JSP exception has occurred

getId

public String getId()

getName

public String getName()

getProperty

public String getProperty()

getScope

public String getScope()

getToScope

public String getToScope()

getType

public String getType()

getValue

public String getValue()

release

public void release()
Release all allocated resources.

setId

public void setId(String id)

setName

public void setName(String name)

setProperty

public void setProperty(String property)

setScope

public void setScope(String scope)

setToScope

public void setToScope(String toScope)

setType

public void setType(String type)

setValue

public void setValue(String value)
Copyright B) 2000-2007 - The Apache Software Foundation