NextApp Echo
App Container 1.1.4

nextapp.echoservlet.ui
Class RadioButtonUI

java.lang.Object
  extended bynextapp.echoservlet.ComponentPeer
      extended bynextapp.echoservlet.ui.AbstractButtonUI
          extended bynextapp.echoservlet.ui.ToggleButtonUI
              extended bynextapp.echoservlet.ui.RadioButtonUI
All Implemented Interfaces:
Alignment, ClientActionProducer, ClientInputProducer, ControllerFieldInitialState, java.util.EventListener, nextapp.echo.event.ImageUpdateListener, java.beans.PropertyChangeListener, java.io.Serializable

public class RadioButtonUI
extends ToggleButtonUI
implements ClientInputProducer, ControllerFieldInitialState

A peer for RadioButton components.

See Also:
Serialized Form

Field Summary
static Service SERVICE_RADIO_BUTTON_OFF
          A service that renders the default deselected radio button image.
static Service SERVICE_RADIO_BUTTON_ON
          A service that renders the default selected radio button image.
 
Fields inherited from class nextapp.echoservlet.ui.ToggleButtonUI
ROLLOVER_SELECTED_ICON_IMAGE, SELECTED_ICON_IMAGE, SERVICE_TOGGLE_BUTTON_SCRIPT, TOGGLE_IMAGE_PREFIX
 
Fields inherited from class nextapp.echoservlet.ui.AbstractButtonUI
ICON_IMAGE, imageManager, renderedActive, ROLLOVER_ICON_IMAGE
 
Constructor Summary
RadioButtonUI()
           
 
Method Summary
 void clientInput(java.lang.String input)
          Called when a client sends an input string through an input field.
 java.lang.String getControllerFieldValue()
          Returns the value that will be rendered in the component's hidden state element in the controller form.
 java.lang.String getDefaultStateImageUri(RenderingContext rc, boolean selected)
          Returns the URI of the default image used to represent the toggle button's state.
 java.lang.String getScriptAction(RenderingContext rc)
          Returns JavaScript code that will be executed when the button is clicked.
 Id getStateId()
          Returns the Id of the controller input field in which the ToggleButton's state is to be stored.
 
Methods inherited from class nextapp.echoservlet.ui.ToggleButtonUI
getScriptCustomStateIconToggleRollover, getStateImageUri, propertyChange, registered, unregistered
 
Methods inherited from class nextapp.echoservlet.ui.AbstractButtonUI
clientAction, getHorizontalAlignment, getVerticalAlignment, imageUpdate, render
 
Methods inherited from class nextapp.echoservlet.ComponentPeer
addAncillaryService, generateId, getBackground, getChildCount, getChildren, getComponent, getFocusedElementId, getFont, getForeground, getId, getInstancePeer, getParent, getPeer, getTabIndex, redraw, removeAncillaryService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nextapp.echoservlet.ClientInputProducer
getId
 

Field Detail

SERVICE_RADIO_BUTTON_OFF

public static final Service SERVICE_RADIO_BUTTON_OFF
A service that renders the default deselected radio button image.


SERVICE_RADIO_BUTTON_ON

public static final Service SERVICE_RADIO_BUTTON_ON
A service that renders the default selected radio button image.

Constructor Detail

RadioButtonUI

public RadioButtonUI()
Method Detail

clientInput

public void clientInput(java.lang.String input)
Description copied from interface: ClientInputProducer
Called when a client sends an input string through an input field.

Specified by:
clientInput in interface ClientInputProducer
Parameters:
input - The data in the hidden input field in the controller form as last known.
See Also:
ClientInputProducer.clientInput(String)

getControllerFieldValue

public java.lang.String getControllerFieldValue()
Description copied from interface: ControllerFieldInitialState
Returns the value that will be rendered in the component's hidden state element in the controller form.

Specified by:
getControllerFieldValue in interface ControllerFieldInitialState
Returns:
The value that will be rendered in the component's hidden state element in the controller form.
See Also:
ControllerFieldInitialState.getControllerFieldValue()

getDefaultStateImageUri

public java.lang.String getDefaultStateImageUri(RenderingContext rc,
                                                boolean selected)
Description copied from class: ToggleButtonUI
Returns the URI of the default image used to represent the toggle button's state.

Specified by:
getDefaultStateImageUri in class ToggleButtonUI
Parameters:
rc - The RenderingContext to which the button is being rendered.
selected - True if the selected state image is being requested.
Returns:
The URI of the default state image.
See Also:
ToggleButtonUI.getDefaultStateImageUri(RenderingContext, boolean)

getScriptAction

public java.lang.String getScriptAction(RenderingContext rc)
Description copied from class: AbstractButtonUI
Returns JavaScript code that will be executed when the button is clicked. On plain Buttons, this will normally send input to the server. On ToggleButtons, the selection state will change and input may also be sent to the server if desired by the application.

Specified by:
getScriptAction in class AbstractButtonUI
Parameters:
rc - The RenderingContext being used for the rendering of the button.
Returns:
A JavaScript method call that will be executed when the button is clicked. The returned string must be valid HTML.
See Also:
AbstractButtonUI.getScriptAction(RenderingContext)

getStateId

public Id getStateId()
Description copied from class: ToggleButtonUI
Returns the Id of the controller input field in which the ToggleButton's state is to be stored. In the case where multiple RadioButtons are in a ButtonGroup, the state will be stored in only one field, specified by this method.

The default implementation returns the Id of this peer.

Overrides:
getStateId in class ToggleButtonUI
Returns:
The Id of the controller input field used to store the ToggleButton's state.
See Also:
ToggleButtonUI.getStateId()

NextApp Echo
App Container 1.1.4