BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags
Class DataSourceTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.bea.wlw.netui.tags.AbstractBaseTag
              extended by com.bea.wlw.netui.tags.DataSourceTag
All Implemented Interfaces:
HtmlConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
CellRepeater, DefaultableDataSourceTag, FileUpload, Grid, Hidden, Repeater, Tree

public abstract class DataSourceTag
extends AbstractBaseTag

Abstract tag class that adds support for a dataSource on the tag. The dataSource is where this tag gets its data from and writes its data to.

For example, would pull from the form bean's foo property to populate the textbox. It would also set the value of the textbox on a post back into the foo property of the form bean.

The dataSource can either be an expression or the name of a form bean property. In the above example, would have the exact same behavior.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
DataSourceTag()
           
 
Method Summary
protected  void addNamingInterceptor(NameInterceptor item)
           
protected  String doNaming()
           
protected  Object evaluateDataSource()
          An internal method that is used for evaluating the dataSource attribute.
 String getDataSource()
          Gets the tag's data source (can be an expression).
protected  void localRelease()
          Release any acquired resources.
protected  String qualifyAttribute(String name)
          An internal method that allows a tag to qualify its dataSource attribute as a NetUI expression before continuing.
protected  void removeNamingInterceptor(NameInterceptor item)
           
 void setDataSource(String dataSource)
          Sets the tag's data source (can be an expression).
 
Methods inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, containsExpression, evaluateAttributeToString, evaluateExpression, filter, filter, formatErrorString, formatString, getAttribute, getErrorsReport, getExpressionEvaluator, getJavaScriptUtils, getNearestForm, getNextId, getQualifiedBundleName, getScriptReporter, getTagName, getUserLocale, hasErrors, isExpression, prepForRendering, registerAttribute, registerError, registerTagError, release, removeAttribute, renderAttribute, renderAttributes, reportErrors, rewriteName, setPageContext, updateExpression, write
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Constructor Detail

DataSourceTag

public DataSourceTag()
Method Detail

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class AbstractBaseTag

setDataSource

public void setDataSource(String dataSource)
Sets the tag's data source (can be an expression).

Parameters:
dataSource - - the data source
Beadoc.attributedescription:

The dataSource attribute determines both (1) the source of populating data for the tag and (2) the object to which the tag submits data.

For example, assume that the Controller file (= JPF file) contains a Form Bean with the property foo. Then the following <netui:textBox> tag will (1) draw populating data from the Form Bean's foo property and (2) submit user defined data to the same property.

    <netui:textBox dataSource="{actionForm.foo}" />

The dataSource attribute takes either a data binding expression or the name of a Form Bean property. In the above example, <netui:textBox dataSource="foo" /> would have the exactly same behavior.

When the tag is used to submit data, the data binding expression must refer to a Form Bean property. In cases where the tag is not used to submit data, but is used for displaying data only, the data binding expression need not refer to a Form Bean property. For example, assume that myIterativeData is a member variable on the Controller file ( = JPF file). The following <netui-data:repeater> tag draws its data from myIterativeData.

    <netui-data:repeater dataSource="{pageFlow.myIterativeData}">

Beadoc.attributesyntaxvalue:
expression_datasource
Beadoc.databindable:
Read / Write

getDataSource

public String getDataSource()
Gets the tag's data source (can be an expression).

Returns:
the data source

addNamingInterceptor

protected void addNamingInterceptor(NameInterceptor item)
Exclude:

removeNamingInterceptor

protected void removeNamingInterceptor(NameInterceptor item)
Exclude:

qualifyAttribute

protected String qualifyAttribute(String name)
                           throws javax.servlet.jsp.JspException
An internal method that allows a tag to qualify its dataSource attribute as a NetUI expression before continuing. This is allows the Struts style naming convention to be converted into an internal representation before evaluation.

Throws:
javax.servlet.jsp.JspException
Exclude:

evaluateDataSource

protected Object evaluateDataSource()
                             throws javax.servlet.jsp.JspException
An internal method that is used for evaluating the dataSource attribute. The dataSource attribute is handled specially becuase it must be of a particular format in order to be usable by NetUI tags. This requirement exists in order to facilitate round-tripping the dataSource attribute as the name attribute of HTML tags. Upon a POST, the name attribute is used as an l-value for an update expression in order to push any POST-ed data back into the bean from whence it came.

Throws:
javax.servlet.jsp.JspException
Exclude:

doNaming

protected String doNaming()
                   throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException
Exclude:

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.