GetData Class

com.bea.wlw.netui.tags.databinding.script
GetData Class

public class GetData

    extends AbstractBaseTag

This tag evaluates an expression and places the result of expression evaluation in a JSP's PageContext. This can be used to extract objects from forms, page flows, and other objects that can be databound; once in the JSP, scriptlet can be written using these objects by accessing them through the PageContext.getAttribute(String) method.

Attribute Descriptions
AttributeRequiredRuntime Expression EvaluationData Bindable
resultIdYesNoYes
The String identifier under which the Object resulting from expression evaluation will be stored.
valueYesNoYes
The expression that references the data to store in the PageContext attribute map.

Related Topics

<netui-data:getData> Tag Sample
Using Data Binding in Page Flows (PageContext section)
PageContext


Hierarchy
Object
  TagSupport
    BodyTagSupport
      AbstractBaseTag
        GetData
All Implemented Interfaces

BodyTag, IterationTag, Serializable, Tag

Field Summary

   
Fields from  com.bea.wlw.netui.tags.AbstractBaseTag
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, CLASS, ID, JAVASCRIPT_STATUS, NAME, NETUI_UNIQUE_CNT, ONCLICK, ONDBLCLICK, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, STYLE, TABINDEX
 
Fields from  javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields from  javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 

Constructor Summary

GetData()

 

Method Summary

public int
doEndTag()
Evaluate the expression at the value attribute and store the result in the PageContext under the attribute key resultId.
public int
doStartTag()
Start the tag evaluation.
public String
getResultId()
Get the key under which the result of evaluating the expression will be stored in the PageContext.
public String
getTagName()
Get the name of this tag.
public String
getValue()
Get the expression to evaluate.
protected void
localRelease()
Reset all of the fields of this tag.
public void
setResultId(String resultId)
Set the String key under which the result of evaluating an expression will be stored in the PageContext.
public void
setValue(String value)
Set the expression to evaluate.
 
Methods from  com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, evaluateAttributeToString, filter, filter, getJavaScriptUtils, getNearestForm, getScriptReporter, getUserLocale, registerTagError, release, renderAttribute, rewriteName, write
 
Methods from  javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods from  javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface javax.servlet.jsp.tagext.BodyTag
doInitBody, setBodyContent
 
Methods from interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
 
Methods from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent
 

Constructor Detail

GetData

public GetData()
 

Method Detail

doEndTag() Method

public int doEndTag()
throws JspException
Evaluate the expression at the value attribute and store the result in the PageContext under the attribute key resultId. If an existing key in the PageContext's attribute map exists, a warning will be written to the log file. If errors occur during expression evaluation, they will be reported in the JSP page. If the value returned by the expression is null, an attribute named resultId will be removed from the PageContext's attribute map.

Overrides
BodyTagSupport.doEndTag()

Returns

EVAL_PAGE

Exceptions

JspException

doStartTag() Method

public int doStartTag()
Start the tag evaluation. This tag ignores its body content.

Overrides
BodyTagSupport.doStartTag()

Returns

SKIP_BODY

getResultId() Method

public String getResultId()
Get the key under which the result of evaluating the expression will be stored in the PageContext.

Returns

the String key

getTagName() Method

public String getTagName()
Get the name of this tag. This is used to identify the type of this tag for reporting tag errors.

Overrides
AbstractBaseTag.getTagName()

Returns

a constant String representing the name of this tag.

getValue() Method

public String getValue()
Get the expression to evaluate.

Returns

the expression to evaluate

localRelease() Method

protected void localRelease()
Reset all of the fields of this tag.

Overrides
AbstractBaseTag.localRelease()

setResultId(String) Method

public void setResultId(String resultId)
Set the String key under which the result of evaluating an expression will be stored in the PageContext.

Parameters

resultId
the String key

setValue(String) Method

public void setValue(String value)
Set the expression to evaluate.

Parameters

value
the expression to evaluate