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.html
Class RadioButtonOption

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.html.RadioButtonOption
All Implemented Interfaces:
HtmlConstants, IAttributeConsumer, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class RadioButtonOption
extends AbstractBaseTag
implements IAttributeConsumer

A radio button whose state is determined by its enclosing RadioButtonGroup.

Attribute Descriptions
AttributeRequiredRuntime Expression EvaluationData Bindable
accessKeyNoNoNo
Define the keyboard navigation key for the element.
altNoNoRead Only
Define the alt attribute of the <Input> element.
labelStyleNoNoNo
The style of the label for each contained CheckBoxOption
labelStyleClassNoNoNo
The style class of the label for each contained CheckBoxOption
tagIdNoNoNo
The id of this control. The real id written to the HTML stream may be changed by the container (Portal), but may be looked up with the 'tagId' value through the JavaScript method getNetuiTagName( tagId, tag ) method written by the <netui:html> tag.
valueYesNoRead Only
An expression to a bean property, or a literal, which is the value of this option

See Also:
RadioButtonGroup, Serialized Form
Example:
In this example, three radiobuttons are generated in the browser.
    <netui:form action="processData">
        <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>    
        <netui:button value="Submit" />
    </netui:form>

Sample Code

[BEA_HOME]/weblogic81/samples/SamplesApp/WebApp/tagSamples/netui/radioButtons/

Beadoc.see:
<netui:radionButton> Tag Samples
Beadoc.tagdescription:
Generates a single radiobutton option in a group of options.

The <radioButtonOption> tag must have a parent RadioButtonGroup tag.


Field Summary
protected  String labelStyle
           
static String LABELSTYLE
           
protected  String labelStyleClass
           
static String LABELSTYLECLASS
           
protected  String text
          The message text to be displayed to the user for this tag (if any)
protected  String value
          The server value for this radiobutton, also used to match against the current property value to determine whether this radiobutton should be marked as selected.
 
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
RadioButtonOption()
           
 
Method Summary
 int doAfterBody()
          Process the body text of this tag (if any).
 int doEndTag()
          Process the end of this tag.
 int doStartTag()
          Process the start of this tag.
 String getAccessKey()
          Gets the accessKey attribute value.
 String getAlt()
          Gets the alt attribute on the generate <input tag.
 String getLabelStyle()
          Return the label style for each contained RadioButtonOption.
 String getLabelStyleClass()
          Return the label style class for each contained RadioButtonOption.
 String getOnBlur()
          Gets the onBlur javascript event.
 String getOnChange()
          Gets the onChange javascript event.
 String getOnClick()
          Gets the onClick javascript event.
 String getOnDblClick()
          Gets the onDblClick javascript event.
 String getOnFocus()
          Gets the onFocus javascript event.
 String getOnKeyDown()
          Gets the onKeyDown javascript event.
 String getOnKeyPress()
          Gets the onKeyPress javascript event.
 String getOnKeyUp()
          Gets the onKeyUp javascript event.
 String getOnMouseDown()
          Gets the onMouseDown javascript event.
 String getOnMouseMove()
          Gets the onMouseMove javascript event.
 String getOnMouseOut()
          Gets the onMouseOut javascript event.
 String getOnMouseOver()
          Gets the onMouseOver javascript event.
 String getOnMouseUp()
          Gets the onMouseUp javascript event.
 String getOnSelect()
          Gets the onSelect javascript event.
 String getStyle()
          Gets the style of the rendered html tag.
 String getStyleClass()
          Gets the style class of the rendered html tag.
 String getTabindex()
          Gets the tabIndex of the rendered html tag.
 String getTagId()
          Return the ID of the tag.
 String getTagName()
          Return the name of the Tag.
 String getValue()
          Return the value of this RadioButtonOption.
protected  void localRelease()
          Release any acquired resources.
 void setAccessKey(String accessKey)
          Sets the accessKey attribute value.
 void setAlt(String alt)
          Sets the alt attribute value.
 void setAttribute(String name, String value)
          Set an attribute value.
 void setLabelStyle(String labelStyle)
          Set the label style for each contained RadioButtonOption.
 void setLabelStyleClass(String labelStyleClass)
          Set the label style class for each contained RadioButtonOption.
 void setOnBlur(String onblur)
          Sets the onBlur javascript event.
 void setOnChange(String onchange)
          Sets the onChange javascript event.
 void setOnClick(String onclick)
          Sets the onClick javascript event.
 void setOnDblClick(String ondblclick)
          Sets the onDblClick javascript event.
 void setOnFocus(String onfocus)
          Sets the onFocus javascript event.
 void setOnKeyDown(String onkeydown)
          Sets the onKeyDown javascript event.
 void setOnKeyPress(String onkeypress)
          Sets the onKeyPress javascript event.
 void setOnKeyUp(String onkeyup)
          Sets the onKeyUp javascript event.
 void setOnMouseDown(String onmousedown)
          Sets the onMouseDown javascript event.
 void setOnMouseMove(String onmousemove)
          Sets the onMouseMove javascript event.
 void setOnMouseOut(String onmouseout)
          Sets the onMouseOut javascript event.
 void setOnMouseOver(String onmouseover)
          Sets the onMouseOver javascript event.
 void setOnMouseUp(String onmouseup)
          Sets the onMouseUp javascript event.
 void setOnSelect(String onselect)
          Sets the onSelect javascript event.
 void setStyle(String style)
          Sets the style of the rendered html tag.
 void setStyleClass(String styleClass)
          Sets the style class of the rendered html tag.
 void setTabindex(String tabindex)
          Sets the tabIndex of the rendered html tag.
 void setTagId(String tagId)
          Set the ID of the tag.
 void setValue(String value)
          Set the value of this RadioButtonOption.
protected  String text()
          Return the text to be displayed to the user for this radiobutton (if any).
 
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, 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
doInitBody, 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
 

Field Detail

LABELSTYLE

public static final String LABELSTYLE
See Also:
Constant Field Values

LABELSTYLECLASS

public static final String LABELSTYLECLASS
See Also:
Constant Field Values

text

protected String text
The message text to be displayed to the user for this tag (if any)


value

protected String value
The server value for this radiobutton, also used to match against the current property value to determine whether this radiobutton should be marked as selected.


labelStyle

protected String labelStyle

labelStyleClass

protected String labelStyleClass
Constructor Detail

RadioButtonOption

public RadioButtonOption()
Method Detail

getTagName

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

Specified by:
getTagName in class AbstractBaseTag

setAttribute

public void setAttribute(String name,
                         String value)
                  throws javax.servlet.jsp.JspException
Set an attribute value. The name represents the name of the attribute. The value represents the value and may contain a netui expression. This method may result in errors being generated. This requires that the tag buffer its body and write attributes in the end tag. For the radiobuttonoption tag it is not legal to set the id, name, type, value, or checked attributes with this method.

Specified by:
setAttribute in interface IAttributeConsumer
Parameters:
name - The name of the attribute. This value may not be null or the empty string.
value - The value of the attribute. This may contain a netui expression.
Throws:
javax.servlet.jsp.JspException - A JspException may be thrown if there is an error setting the attribute.

getLabelStyle

public String getLabelStyle()
Return the label style for each contained RadioButtonOption.

Returns:
the label style

setLabelStyle

public void setLabelStyle(String labelStyle)
Set the label style for each contained RadioButtonOption. The label style here will override a labelStyle at the RadioButtonGroup level.

Parameters:
labelStyle - - the label style
Beadoc.attributedescription:
The style of the label for each contained <netui:radioButtonOption> tag.
Beadoc.attributesyntaxvalue:
string_labelStyle
Beadoc.databindable:
false

getLabelStyleClass

public String getLabelStyleClass()
Return the label style class for each contained RadioButtonOption.

Returns:
the label style

setLabelStyleClass

public void setLabelStyleClass(String labelStyleClass)
Set the label style class for each contained RadioButtonOption. The label style class here will override a labelStyleClass at the RadioButtonGroup level.

Parameters:
labelStyleClass - - the label style
Beadoc.attributedescription:
The class of the labels for each contained <netui:radioButtonOption> tag.
Beadoc.attributesyntaxvalue:
string_class
Beadoc.databindable:
false

getValue

public String getValue()
Return the value of this RadioButtonOption.

Returns:
the RadioButtonOption value

setValue

public void setValue(String value)
Set the value of this RadioButtonOption.

Parameters:
value - - the RadioButtonOption value
Beadoc.attributedescription:
A literal or data binding expression.
Beadoc.attributesyntaxvalue:
string_or_expression_value
Beadoc.databindable:
Read Only

getTagId

public String getTagId()
Return the ID of the tag. The id may be rewritten by the container (such as a portal) to make sure it is unique. JavaScript my lookup the actual id of the element by looking it up in the netui_names table written into the HTML.

Returns:
the tagId.

setTagId

public void setTagId(String tagId)
Set the ID of the tag.

Parameters:
tagId - - the tagId.
Beadoc.attributedescription:

String value. Sets the id (or name) attribute of the rendered HTML tag. Note that the real id attribute rendered in the browser may be changed by the application container (for example, Portal containers may change the rendered id value to ensure the uniqueness of id's on the page). In this case, the real id rendered in the browser may be looked up through the JavaScript function getNetuiTagName( tagId, tag ).

For example, assume that some tag's tagId attribute is set to foo.

    <netui:textBox tagId="foo" />

Then the following JavaScript function will return the real id attribute rendered in the browser:

    getNetuiTagName( "foo", this )

To get a <netui:form> element and all of its children elements in JavaScript, use the same JavaScript function getNetuiTagName( tagId, tag ). For example, assume that there is a <netui:form> whose tagId attribute is set to bar.

    <netui:form tagId="bar" >

Then the following JavaScript function will return the <netui:form> element and its children (packaged as an array).

    document[getNetuiTagName( "bar", this )]

To retreive the value entered into a <netui:textBox> within the <netui:form> tag, use the following JavaScript expression.

    document[getNetuiTagName("bar", this)][getNetuiTagName("foo", this)].value

The second parameter ensures that the JavaScript function begins its search within the correct Portlet scope. Pass the JavaScript keyword this as the second parameter. For detailed information on using the function getNetuiTagName( tagId, tag ) see Using JavaScript in Page Flow and Portal Applications.

Beadoc.attributesyntaxvalue:
string_tagId
Beadoc.databindable:
false

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Process the start of this tag.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Process the body text of this tag (if any).

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end of this tag.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class AbstractBaseTag

text

protected String text()
               throws javax.servlet.jsp.JspException
Return the text to be displayed to the user for this radiobutton (if any).

Throws:
javax.servlet.jsp.JspException - if an error occurs
Exclude:

setTabindex

public void setTabindex(String tabindex)
Sets the tabIndex of the rendered html tag.

Parameters:
tabindex - - the tab index.
Beadoc.attributedescription:
The tabIndex of the rendered HTML tag. This attribute determines the position of the tag in the sequence of page elements that the user may advance through by pressing the TAB key.
Beadoc.attributesyntaxvalue:
string_tabIndex
Beadoc.databindable:
false

getTabindex

public String getTabindex()
Gets the tabIndex of the rendered html tag.

Returns:
the tabindex.

setStyle

public void setStyle(String style)
Sets the style of the rendered html tag.

Parameters:
style - - the html style.
Beadoc.attributedescription:
The style of the rendered HTML tag.
Beadoc.attributesyntaxvalue:
string_Style
Beadoc.databindable:
false

getStyle

public String getStyle()
Gets the style of the rendered html tag.

Returns:
the style.

setStyleClass

public void setStyleClass(String styleClass)
Sets the style class of the rendered html tag.

Parameters:
styleClass - - the html style class.
Beadoc.attributedescription:
The class of the rendered HTML tag.
Beadoc.attributesyntaxvalue:
string_Class
Beadoc.databindable:
false

getStyleClass

public String getStyleClass()
Gets the style class of the rendered html tag.

Returns:
the style class.

getAccessKey

public String getAccessKey()
Gets the accessKey attribute value.

Returns:
the accessKey value.

setAccessKey

public void setAccessKey(String accessKey)
Sets the accessKey attribute value. This should key value of the keyboard navigation key. It is recommended not to use the following values because there are often used by browsers A, C, E, F, G, H, V, left arrow, and right arrow.

Parameters:
accessKey - - the accessKey value.
Beadoc.attributedescription:
The keyboard navigation key for the element. The following values are not recommended because they are often used by browsers: A, C, E, F, G, H, V, left arrow, and right arrow
Beadoc.attributesyntaxvalue:
string_accessKey
Beadoc.databindable:
false

getAlt

public String getAlt()
Gets the alt attribute on the generate <input tag.

Returns:
the alt value.

setAlt

public void setAlt(String alt)
Sets the alt attribute value.

Parameters:
alt - - the alt value.
Beadoc.attributedescription:
The alt attribute of the element.
Beadoc.attributesyntaxvalue:
string_alt
Beadoc.databindable:
Read Only

getOnClick

public String getOnClick()
Gets the onClick javascript event.

Returns:
the onClick event.

setOnClick

public void setOnClick(String onclick)
Sets the onClick javascript event.

Parameters:
onclick - - the onClick event.
Beadoc.attributedescription:
The onClick JavaScript event.
Beadoc.attributesyntaxvalue:
string_onClick
Beadoc.databindable:
false

getOnDblClick

public String getOnDblClick()
Gets the onDblClick javascript event.

Returns:
the onDblClick event.

setOnDblClick

public void setOnDblClick(String ondblclick)
Sets the onDblClick javascript event.

Parameters:
ondblclick - - the onDblClick event.
Beadoc.attributedescription:
The onDblClick JavaScript event.
Beadoc.attributesyntaxvalue:
string_onDblClick
Beadoc.databindable:
false

getOnKeyDown

public String getOnKeyDown()
Gets the onKeyDown javascript event.

Returns:
the onKeyDown event.

setOnKeyDown

public void setOnKeyDown(String onkeydown)
Sets the onKeyDown javascript event.

Parameters:
onkeydown - - the onKeyDown event.
Beadoc.attributedescription:
The onKeyDown JavaScript event.
Beadoc.attributesyntaxvalue:
string_onKeyDown
Beadoc.databindable:
false

getOnKeyPress

public String getOnKeyPress()
Gets the onKeyPress javascript event.

Returns:
the onKeyPress event.

setOnKeyPress

public void setOnKeyPress(String onkeypress)
Sets the onKeyPress javascript event.

Parameters:
onkeypress - - the onKeyPress event.
Beadoc.attributedescription:
The onKeyPress JavaScript event.
Beadoc.attributesyntaxvalue:
string_onKeyPress
Beadoc.databindable:
false

getOnKeyUp

public String getOnKeyUp()
Gets the onKeyUp javascript event.

Returns:
the onKeyUp event.

setOnKeyUp

public void setOnKeyUp(String onkeyup)
Sets the onKeyUp javascript event.

Parameters:
onkeyup - - the onKeyUp event.
Beadoc.attributedescription:
The onKeyUp JavaScript event.
Beadoc.attributesyntaxvalue:
string_onKeyUp
Beadoc.databindable:
false

getOnMouseDown

public String getOnMouseDown()
Gets the onMouseDown javascript event.

Returns:
the onMouseDown event.

setOnMouseDown

public void setOnMouseDown(String onmousedown)
Sets the onMouseDown javascript event.

Parameters:
onmousedown - - the onMouseDown event.
Beadoc.attributedescription:
The onMouseDown JavaScript event.
Beadoc.attributesyntaxvalue:
string_onMouseDown
Beadoc.databindable:
false

getOnMouseMove

public String getOnMouseMove()
Gets the onMouseMove javascript event.

Returns:
the onMouseMove event.

setOnMouseMove

public void setOnMouseMove(String onmousemove)
Sets the onMouseMove javascript event.

Parameters:
onmousemove - - the onMouseMove event.
Beadoc.attributedescription:
The onMouseMove JavaScript event.
Beadoc.attributesyntaxvalue:
string_onMouseMove
Beadoc.databindable:
false

getOnMouseOut

public String getOnMouseOut()
Gets the onMouseOut javascript event.

Returns:
the onMouseOut event.

setOnMouseOut

public void setOnMouseOut(String onmouseout)
Sets the onMouseOut javascript event.

Parameters:
onmouseout - - the onMouseOut event.
Beadoc.attributedescription:
The onMouseOut JavaScript event.
Beadoc.attributesyntaxvalue:
string_onMouseOut
Beadoc.databindable:
false

getOnMouseOver

public String getOnMouseOver()
Gets the onMouseOver javascript event.

Returns:
the onMouseOver event.

setOnMouseOver

public void setOnMouseOver(String onmouseover)
Sets the onMouseOver javascript event.

Parameters:
onmouseover - - the onMouseOver event.
Beadoc.attributedescription:
The onMouseOver JavaScript event.
Beadoc.attributesyntaxvalue:
string_onMouseOver
Beadoc.databindable:
false

getOnMouseUp

public String getOnMouseUp()
Gets the onMouseUp javascript event.

Returns:
the onMouseUp event.

setOnMouseUp

public void setOnMouseUp(String onmouseup)
Sets the onMouseUp javascript event.

Parameters:
onmouseup - - the onMouseUp event.
Beadoc.attributedescription:
The onMouseUp JavaScript event.
Beadoc.attributesyntaxvalue:
string_onMouseUp
Beadoc.databindable:
false

getOnBlur

public String getOnBlur()
Gets the onBlur javascript event.

Returns:
the onBlur event.

setOnBlur

public void setOnBlur(String onblur)
Sets the onBlur javascript event.

Parameters:
onblur - - the onBlur event.
Beadoc.attributedescription:
The onBlur JavaScript event.
Beadoc.attributesyntaxvalue:
string_onBlur
Beadoc.databindable:
false

getOnFocus

public String getOnFocus()
Gets the onFocus javascript event.

Returns:
the onFocus event.

setOnFocus

public void setOnFocus(String onfocus)
Sets the onFocus javascript event.

Parameters:
onfocus - - the onFocus event.
Beadoc.attributedescription:
The onFocus JavaScript event.
Beadoc.attributesyntaxvalue:
string_onFocus
Beadoc.databindable:
false

getOnChange

public String getOnChange()
Gets the onChange javascript event.

Returns:
the onChange event.

setOnChange

public void setOnChange(String onchange)
Sets the onChange javascript event.

Parameters:
onchange - - the onChange event.
Beadoc.attributedescription:
The onChange JavaScript event.
Beadoc.attributesyntaxvalue:
string_onChange
Beadoc.databindable:
false

getOnSelect

public String getOnSelect()
Gets the onSelect javascript event.

Returns:
the onSelect event.

setOnSelect

public void setOnSelect(String onselect)
Sets the onSelect javascript event.

Parameters:
onselect - - the onSelect event.
Beadoc.attributedescription:
The onSelect JavaScript event.
Beadoc.attributesyntaxvalue:
string_onSelect
Beadoc.databindable:
false

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