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

Object
  extended by TagSupport
      extended by BodyTagSupport
          extended by AbstractClassicTag
              extended by HtmlGroupBaseTag
                  extended by RadioButtonGroup
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, IDataAccessProvider, HtmlConstants, IAttributeConsumer, INetuiTag

public class RadioButtonGroup
extends HtmlGroupBaseTag

Groups a collection of RadioButtonOptions, and handles databinding of their values. If RadioButtonGroup uses any Format tags, it must have those tags come before above any nested RadioButtonOption tags.

See Also:
Serialized Form
Example
In this sample, a <netui:radioButtonGroup> tag draws a set of options from a HashMap object.
         <netui:radioButtonGroup
          optionsDataSource="{pageFlow.hashMap}"
          dataSource="{actionForm.selection}" />
Assuming that the optionsDataSource attribute refers to the following HashMap object...
     public HashMap hashMap = new HashMap();
     protected void onCreate()
     {
         hashMap.put("value1", "Display Text 1");
         hashMap.put("value2", "Display Text 2");
         hashMap.put("value3", "Display Text 3");
     }
...then the following HTML will be generated in the browser...
     <netui:radioButtonGroup dataSource="{actionForm.selection}">
        <netui:radioButtonOption value="value1">Display Text 1</netui:radioButtonOption><br>
        <netui:radioButtonOption value="value2">Display Text 2</netui:radioButtonOption><br>
        <netui:radioButtonOption value="value3">Display Text 3</netui:radioButtonOption><br>
    </netui:radioButtonGroup>

Field Summary
static String RADIOBUTTONGROUP_KEY
           
 
Fields inherited from class HtmlGroupBaseTag
_cr, _dataSource, _defaultValue, _disabled, _labelStyle, _labelStyleClass, _optionsDataSource, _repCurItem, _repeater, _repIdx, HORIZONTAL_VALUE, VERTICAL_VALUE
 
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, 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
RadioButtonGroup()
           
 
Method Summary
 int doAfterBody()
          Save any body content of this tag, which will generally be the option(s) representing the values displayed to the user.
 int doEndTag()
          Render the set of RadioButtonOptions.
 int doStartTag()
          Determine the match for the RadioButtonGroup
protected  List getNamingChain()
          Return an ArrayList which represents a chain of INameInterceptor objects.
 String getTagName()
          Return the name of the Tag.
 boolean isMatched(String value, Boolean defaultValue)
          Does the specified value match one of those we are looking for?
protected  void localRelease()
          Release any acquired resources.
 
Methods inherited from class HtmlGroupBaseTag
addOption, doNaming, evaluateDataSource, evaluateOptionsDataSource, getCurrentIndex, getCurrentItem, getCurrentMetadata, getDataSource, getLabelStyle, getLabelStyleClass, getOptionsDataSource, getProviderParent, getQualifiedDataSourceName, isDisabled, isRepeater, isVertical, setAttribute, setDataSource, setDefaultValue, setDisabled, setLabelStyle, setLabelStyleClass, setOptionsDataSource, setOrientation, setRepeater, setStyle, setStyleClass
 
Methods inherited from class AbstractClassicTag
applyNamingChain, getErrorsReport, getIdForTagId, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class BodyTagSupport
doInitBody, 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

RADIOBUTTONGROUP_KEY

public static final String RADIOBUTTONGROUP_KEY
See Also:
Constant Field Values
Constructor Detail

RadioButtonGroup

public RadioButtonGroup()
Method Detail

getTagName

public String getTagName()
Return the name of the Tag.

Specified by:
getTagName in interface INetuiTag
Specified by:
getTagName in class AbstractClassicTag
Returns:
the name of the tag.

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 HtmlGroupBaseTag
Returns:
an ArrayList that will contain INameInterceptor objects.

isMatched

public boolean isMatched(String value,
                         Boolean defaultValue)
Does the specified value match one of those we are looking for?

Specified by:
isMatched in class HtmlGroupBaseTag
Parameters:
value - Value to be compared
Returns:
boolean

doStartTag

public int doStartTag()
               throws JspException
Determine the match for the RadioButtonGroup

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspException - if a JSP exception has occurred

doAfterBody

public int doAfterBody()
                throws JspException
Save any body content of this tag, which will generally be the option(s) representing the values displayed to the user.

Specified by:
doAfterBody in interface IterationTag
Overrides:
doAfterBody in class BodyTagSupport
Throws:
JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws JspException
Render the set of RadioButtonOptions.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class BodyTagSupport
Throws:
JspException - if a JSP exception has occurred

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class HtmlGroupBaseTag