com.iplanet.jato.view.html
Class Option

java.lang.Object
  |
  +--com.iplanet.jato.view.html.Option

public class Option
extends java.lang.Object

The Option encapsulates and implements the server-side representation of an HTML Option (see HTML Radio and Select tags).

Note - this class is NOT derived from DisplayField. It is merely a convenient way of storing an Option value/label combination.

SelectableGroup sub-types use collections of Options.

Version:
JATO/1.2.2 $Id: Option.java,v 1.6 2002/03/16 03:26:44 todd Exp $
See Also:
OptionList, SelectableGroup, RadioButtonGroup, ListBox, ComboBox

Constructor Summary
Option(java.lang.String label, java.lang.String value)
          This constructor can be used when creating an Option directly / protected Option() { super(); } /** This constructor can be used when creating an Option directly
 
Method Summary
 java.lang.String getLabel()
          / public String toString() { String result="Label[" + label + "]"; result += " Value[" + value + "]"; ; return result; } /** Returns the "label" portion of the option.
 java.lang.String getValue()
          Returns the "value" portion of the option.
 void setLabel(java.lang.String label)
          Sets the "label" portion of the option.
 void setValue(java.lang.String value)
          Sets the "value" portion of the option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Option

public Option(java.lang.String label,
              java.lang.String value)
This constructor can be used when creating an Option directly / protected Option() { super(); } /** This constructor can be used when creating an Option directly
Parameters:
label - The visible portion of the option
value - The model to which this DisplayField is bound
Method Detail

getLabel

public java.lang.String getLabel()
/ public String toString() { String result="Label[" + label + "]"; result += " Value[" + value + "]"; ; return result; } /** Returns the "label" portion of the option. The "label" portion is the portion that is visible when the HTML is rendered. as opposed to the value which is not rendered.
e.g.
The value is "1", the label is "one"
Returns:
the label portion of the option

setLabel

public void setLabel(java.lang.String label)
Sets the "label" portion of the option. The "label" portion is the portion that is visible when the HTML is rendered. as opposed to the value which is not rendered.
e.g.
The value is "1", the label is "one"
Parameters:
the - label portion of the option

getValue

public java.lang.String getValue()
Returns the "value" portion of the option. The "value" portion is the portion that is returned to the server during the submit cycle, as opposed to the value which is not returned during a submit.
e.g.
The value is "1", the label is "one"
Returns:
the value portion of the option

setValue

public void setValue(java.lang.String value)
Sets the "value" portion of the option. The "value" portion is the portion that is returned to the server during the submit cycle, as opposed to the value which is not returned during a submit.
e.g.
The value is "1", the label is "one"
Parameters:
the - value portion of the option