fc.web.forms
Class Select.Option

java.lang.Object
  extended by fc.web.forms.Select.Option
Enclosing class:
Select

public static final class Select.Option
extends Object

Represents an option in the selection list


Constructor Summary
Select.Option(String text)
          Constructs a new unselected option with the specified html text and no separate value.
Select.Option(String text, boolean selected)
          Constructs a new option with the specified text (and no separate value tag).
Select.Option(String text, String value)
          Constructs a new unselected option with the specified text and value of the option tag.
Select.Option(String text, String value, boolean selected)
          Constructs a new option with the specified text and value of the option tag.
 
Method Summary
 String getValue()
          Returns the value of this option tag.
 String render(boolean selected)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Select.Option

public Select.Option(String text,
                     String value,
                     boolean selected)
Constructs a new option with the specified text and value of the option tag.

Parameters:
text - the html text of the option tag
value - the value of the option tag
selected - true if this option is selected by default. If more than one selected option is added to a select field and that select field does not have it's multiple attribute set, then the option displayed as selected is browser dependent (Moz1, IE6 show the last selected, N4 the first). More than one selected option should not be shown for non multiple select fields anyway.

Select.Option

public Select.Option(String text,
                     String value)
Constructs a new unselected option with the specified text and value of the option tag.

Parameters:
text - the html text of the option tag
value - the value of the option tag

Select.Option

public Select.Option(String text,
                     boolean selected)
Constructs a new option with the specified text (and no separate value tag).

Parameters:
text - the html text of the option tag
selected - true to select this option false otherwise

Select.Option

public Select.Option(String text)
Constructs a new unselected option with the specified html text and no separate value.

Parameters:
text - the html text of the option tag
Method Detail

getValue

public String getValue()
Returns the value of this option tag. If no value is set, returns the html text value for this option tag


render

public String render(boolean selected)

toString

public String toString()
Overrides:
toString in class Object