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 |
Attribute | Required | Runtime Expression Evaluation | Data Bindable |
resultId | Yes | No | Yes |
The String identifier under which the Object resulting from expression
evaluation will be stored. |
value | Yes | No | Yes |
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
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
|
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.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 |
GetData
public GetData()
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