SimpleServlets v5.5.0

com.simpleservlets.htmlobjects
Class HTMLForm.Option

java.lang.Object
  extended by com.simpleservlets.htmlobjects.GenericHTMLElement
      extended by com.simpleservlets.htmlobjects.HTMLForm.Option
All Implemented Interfaces:
HTMLElement
Enclosing class:
HTMLForm

public static class HTMLForm.Option
extends GenericHTMLElement

Options for HTMLForm.Select, <option> tag.


Field Summary
 
Fields inherited from interface com.simpleservlets.htmlobjects.HTMLElement
ZERO_LEN_ARRAY
 
Constructor Summary
HTMLForm.Option(String text)
           
HTMLForm.Option(String text, boolean selected)
           
HTMLForm.Option(String text, String value, boolean selected)
           
 
Method Summary
static HTMLForm.Option[] createSet(String[] value, String selectedValue, String firstLine)
          Creates a set of option elements.
 void setSelected(boolean selectOn)
           
 void setValue(String value)
           
 
Methods inherited from class com.simpleservlets.htmlobjects.GenericHTMLElement
add, add, addSibling, addSibling, getAttributes, getChildren, getName, getParent, hasAttributes, hasChildren, isSafeToWrapWithWhitespace, removeAllAttributes, removeAllChildren, removeAttribute, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeGroup, setParent, setSafeToWrapWithWhitespace, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLForm.Option

public HTMLForm.Option(String text,
                       String value,
                       boolean selected)

HTMLForm.Option

public HTMLForm.Option(String text,
                       boolean selected)

HTMLForm.Option

public HTMLForm.Option(String text)
Method Detail

setValue

public void setValue(String value)

setSelected

public void setSelected(boolean selectOn)

createSet

public static HTMLForm.Option[] createSet(String[] value,
                                          String selectedValue,
                                          String firstLine)
Creates a set of option elements.

Parameters:
value - list of values to make available.
selectedValue - value to initially select, null for first.
firstLine - null to omit, "" for blank, or other text.
Returns:
options created. If firstLine is null, length is value.length, if firstLine is not null, length is value.length + 1.

SimpleServlets v5.5.0

Copyright © 2001-2007 Programix Incorporated. All rights reserved. SimpleServlets is free and is OSI Certified Open Source Software under the BSD license.