Class java.servlet.html.HtmlChoice
All Packages Class Hierarchy This Package Previous Next Index
Class java.servlet.html.HtmlChoice
java.lang.Object
|
+----java.servlet.html.HtmlContainer
|
+----java.servlet.html.HtmlChoice
- public class HtmlChoice
- extends HtmlContainer
Utility class for generating a Select tag for an HtmlForm.
-
HtmlChoice(String)
- Create a named choice list.
-
HtmlChoice(String, String)
- Create a named choice list, with attributes.
-
add(String)
- Add choice item(s) to the choice list.
-
add(String, boolean)
- Add choice to the choice list, with default.
-
add(String, String)
- Add choice to the chioce list, with specified attributes.
-
toString()
- Output choicelist as a String.
-
write(OutputStream)
- Write html formatted stream to OutputStream.
HtmlChoice
public HtmlChoice(String name)
- Create a named choice list.
- Parameters:
- name - The name of this select tag.
HtmlChoice
public HtmlChoice(String name,
String attribs)
- Create a named choice list, with attributes.
- Parameters:
- name - The name of this select tag
- attribs - Other attributes for this select tag
add
public void add(String choice)
- Add choice item(s) to the choice list.
- Parameters:
- choice - Comma delimmited list of choices.
- Overrides:
- add in class HtmlContainer
add
public void add(String choice,
String attribs)
- Add choice to the chioce list, with specified attributes.
- Parameters:
- choice - The text for this choice.
- attribs - Attributes for this option tag.
- Overrides:
- add in class HtmlContainer
add
public void add(String choice,
boolean selected)
- Add choice to the choice list, with default.
- Parameters:
- choice - The text for this choice.
- selected - True if this choice is selected by default.
write
public void write(OutputStream out) throws IOException
- Write html formatted stream to OutputStream.
- Overrides:
- write in class HtmlContainer
toString
public String toString()
- Output choicelist as a String.
- Overrides:
- toString in class HtmlContainer
All Packages Class Hierarchy This Package Previous Next Index