org.apache.beehive.netui.tags
Class DataSourceTag

Object
  extended by TagSupport
      extended by BodyTagSupport
          extended by AbstractClassicTag
              extended by DataSourceTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, INetuiTag
Direct Known Subclasses:
CellRepeater, Repeater

public abstract class DataSourceTag
extends AbstractClassicTag

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. Tags that implement the dataSource attribute are read-write tags.

For example, <netui:textBox dataSource="{actionForm.foo}" /> 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.

There are several methods on the AbstractClassicTag that supports the implementation of this class. This JavaDoc provides the default implementation necessary to implement this attribute. The overall hiearchy contains mutliple implementations of this attribute and the supporting methods.

The class defines a private backing variable:

 private String _dataSource = null;
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from class AbstractClassicTag
DefaultNamingChain, EMPTY_STRING, NETUI_UNIQUE_CNT
 
Fields inherited from class BodyTagSupport
bodyContent
 
Fields inherited from class TagSupport
id, pageContext
 
Fields inherited from interface BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
DataSourceTag()
          Default constructor for this class.
 
Method Summary
protected  String doNaming()
           
protected  Object evaluateDataSource()
          Return the Object that is represented by the specified data source.
 String getDataSource()
          Gets the tag's data source (can be an expression).
protected  List getNamingChain()
          Return an ArrayList which represents a chain of INameInterceptor objects.
protected  void localRelease()
          Release any acquired resources.
 void setDataSource(String dataSource)
          Sets the tag's data source (can be an expression).
 
Methods inherited from class AbstractClassicTag
applyNamingChain, getErrorsReport, getIdForTagId, getNextId, getScriptReporter, getTagName, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class BodyTagSupport
doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Tag
getParent, setPageContext, setParent
 

Constructor Detail

DataSourceTag

public DataSourceTag()
Default constructor for this class.

Method Detail

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class AbstractClassicTag

getNamingChain

protected List getNamingChain()
Return an ArrayList which represents a chain of INameInterceptor objects. This method by default returns null and should be overridden by objects that support naming.

Overrides:
getNamingChain in class AbstractClassicTag
Returns:
an ArrayList that will contain INameInterceptor objects.

setDataSource

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

Parameters:
dataSource - - the data source

getDataSource

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

Returns:
the data source

evaluateDataSource

protected Object evaluateDataSource()
                             throws JspException
Return the Object that is represented by the specified data source.

Returns:
Object
Throws:
JspException

doNaming

protected String doNaming()
                   throws JspException
Throws:
JspException