C H A P T E R  21

radioButtons


<jato:radioButtons>

Renders a group of HTML radio buttons as comprised of an arbitrary number of HTML <input type="radio"> elements which share the same name attribute value. This tag offers the convenience of treating the set of radio buttons as a single element and the flexibility of dynamic choice generation.

This tag is only valid when enclosed by both an HTML <form> element and a useViewBean, containerView, or tiledView tag. This tag may not contain any body content.

Example:

<jato:radioButtons name="incomeRange" layout="vertical"/>

The above would be rendered into the following HTML:

<input type="radio" name="PageFoo.incomeRange" value="" checked>Nondisclosed

<br>

<input type="radio" name="PageFoo.incomeRange" value="19">$0 to $19,999

<Br>

<input type="radio" name="PageFoo.incomeRange" value="49">$20,000-$49,999

<Br>

<input type="radio" name="PageFoo.incomeRange" value="50">$50,000 or more

<Br>

Attribute Name

Description

Notes

accessKey

Assigns an access key to the rendered HTML element. In general, the access key should be included in label text or wherever the access key is to apply.

RTExpr

disabled

Valid values: "true" or "false"

Disables the HTML control for user input.

  • Disabled controls do not receive focus
  • Disabled controls are skipped in tabbing navigation

If not specified, "false" is assumed.

RTExpr

elementId

Assigns a name to an element. This name must be unique in an HTML document. Please note, this corresponds to the HTML "id" attribute. It has no specific meaning to the JATO framework.

The id attribute has several roles in HTML:

  • As a style sheet selector
  • As a target anchor for hypertext links
  • As a means to reference a particular element from a script

RTExpr

extraHtml

Arbitrary HTML that will be rendered just prior to the closing ">" of this HTML element

RTExpr

layout

Valid values: "h", "horizontal" or anything beginning with "h"

A value beginning with "h" specifies a horizontal arrangement of radio buttons within this group.

No value, or a value beginning with a letter other than "h" specifies a vertical alignment. The vertical arrangement is achieved by appending a <Br> element after each of the rendered HTML radio button controls.

RTExpr

name

The name of the DisplayField peer. This peer must be a child of the current parent ContainerView, TiledView, or ViewBean. The DisplayField name is resolved relative to the current parent view.

The view peer must be of type <JATO package>.view.html.SelectableGroup

This name may be a qualified view path, using forward slashes ("/") as delimiters. All components in the path except the last must refer to a ContainerView or a derivative of ContainerView (such as TiledView). Both relative and absolute paths are possible. If a name path begins with a forward slash, the name is assumed to be relative to the root view (the ViewBean). If the path does not begin with a forward slash, the name is assumed to refer to a child relative to the current container. Two dots ("..") may be used to refer to the container that is the parent of the current container.

Examples:

/header/orderList/customerName (absolute from root view)

orderList/customerName (relative to current container)

../footer/orderList/customerName (relative to parent)

Req

style

CSS styles to be applied to this HTML element.

RTExpr

styleClass

CSS stylesheet class to be applied to this HTML element.

RTExpr

tabIndex

Specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767.

 

 

This tag also supports the following JavaScript events:

onBlur, onChange, onClick, onDblClick, onFocus, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onSelect