org.apache.beehive.netui.tags.html
Class HtmlDataSourceTag

Object
  extended by TagSupport
      extended by BodyTagSupport
          extended by AbstractClassicTag
              extended by HtmlBaseTag
                  extended by HtmlFocusBaseTag
                      extended by HtmlDataSourceTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, HtmlConstants, IAttributeConsumer, IHtmlAttrs, IHtmlCore, IHtmlEvents, IHtmlI18n, INetuiTag
Direct Known Subclasses:
FileUpload, Hidden, HtmlDefaultableDataSourceTag

public abstract class HtmlDataSourceTag
extends HtmlFocusBaseTag

Abstract Base class adding support for the dataSource attribute.

See Also:
Serialized Form

Field Summary
protected  String _dataSource
           
 
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 HtmlConstants
ABBR, ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, AREA, AXIS, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, BUTTON, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COLSPAN, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEADERS, 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, LANGUAGE, 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, ROWSPAN, RULES, SCOPE, SCRIPT, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TBODY, TD, TEXT, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH
 
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
HtmlDataSourceTag()
           
 
Method Summary
protected  Object evaluateDataSource()
          Return the Object that is represented by the specified data source.
protected  List getNamingChain()
          Return an ArrayList which represents a chain of INameInterceptor objects.
protected  void localRelease()
          Release any acquired resources.
protected  void nameHtmlControl(AbstractHtmlControlState state, ByRef javaScript)
          This method will create the name of the form element (HTML Control) that has a name.
 void setDataSource(String dataSource)
          Sets the tag's data source (can be an expression).
 
Methods inherited from class HtmlFocusBaseTag
isDisabled, setDisabled, setOnBlur, setOnChange, setOnFocus, setOnSelect
 
Methods inherited from class HtmlBaseTag
getJavaScriptAttribute, getOnClick, getState, getTagId, renderDefaultNameAndId, renderNameAndId, setAttribute, setDir, setLang, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setStateAttribute, setStyle, setStyleClass, setTagId, setTitle
 
Methods inherited from class AbstractClassicTag
applyNamingChain, getErrorsReport, getIdForTagId, getNearestForm, 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
 

Field Detail

_dataSource

protected String _dataSource
Constructor Detail

HtmlDataSourceTag

public HtmlDataSourceTag()
Method Detail

setDataSource

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

Parameters:
dataSource - the data source

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.

evaluateDataSource

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

Returns:
Object
Throws:
JspException

nameHtmlControl

protected void nameHtmlControl(AbstractHtmlControlState state,
                               ByRef javaScript)
                        throws JspException
This method will create the name of the form element (HTML Control) that has a name. The name attribute represent the "control name" for the control. This name is scoped into the form element. In addition, a control may have a id attribute which is specified by setting the tagId. These two value are set in this routine. The name is always the expression mapping the data to it's backing element and is conotrolled by the optional naming chain provided by the tag. The tagId specifies the id attribute. If this is present then we write out a JavaScript that allows mapping the tagId set on the tag to both the real id value and also the name value. The id is formed by passing the tagId to the URL rewritter service.

Parameters:
state - The tag state structure. This contains both the name and id attributes. The id attribute should be set with the initial value from the tagId.
javaScript - A ByRef element that will contain any JavaScript that should be written out by the calling tag. A value is returned only if tagId is set and there is not IScriptReporter found.
Throws:
JspException - Pass through the exception from applyNamingChain.

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class HtmlFocusBaseTag