org.apache.struts.taglib.bean

Class DefineTag

Known Direct Subclasses:
NestedDefineTag

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 String
body
The body content of this tag (if any).
protected String
id
The name of the scripting variable that will be exposed as a page scope attribute.
private static Log
log
Commons logging instance.
protected static MessageResources
messages
The message resources for this package.
protected String
name
The name of the bean owning the property to be exposed.
protected String
property
The name of the property to be retrieved.
protected String
scope
The scope within which to search for the specified bean.
protected String
toScope
The scope within which the newly defined bean will be creatd.
protected String
type
The fully qualified Java class name of the value to be exposed.
protected String
value
The (String) value to which the defined bean will be set.

Method Summary

int
doAfterBody()
Save the body content of this tag (if any), or throw a JspException if the value was already defined.
int
doEndTag()
Retrieve the required property and expose it as a scripting variable.
int
doStartTag()
Check if we need to evaluate the body of the tag
String
getId()
String
getName()
String
getProperty()
String
getScope()
String
getToScope()
String
getType()
String
getValue()
void
release()
Release all allocated resources.
void
setId(String id)
void
setName(String name)
void
setProperty(String property)
void
setScope(String scope)
void
setToScope(String toScope)
void
setType(String type)
void
setValue(String value)

Field Details

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 Details

doAfterBody

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

doEndTag

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

doStartTag

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

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