HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.transform.html
Class OptionElement

java.lang.Object
  extended by com.ibm.hats.transform.html.HTMLElement
      extended by com.ibm.hats.transform.html.OptionElement

public class OptionElement
extends HTMLElement

OptionElement is the HTMLElement which represents an HTML form selection option such as in the following:

 <SELECT name="quality">
 <OPTION selected value="1">Good</OPTION>
 <OPTION value="2">Better</OPTION>
 <OPTION value="3">Best</OPTION>
 </SELECT>
 
which appears as

See Also:
SelectElement, HTMLElementFactory.createOptionElement(FunctionKeyComponentElement, String), HTMLElementFactory.createOptionElement(ListItemComponentElement, String)

Field Summary
 
Fields inherited from class com.ibm.hats.transform.html.HTMLElement
ATTR_ACCESS_KEY, ATTR_ACTION, ATTR_ALT, ATTR_CLASS_NAME, ATTR_DIR, ATTR_FOR, ATTR_HREF, ATTR_ID, ATTR_IMG_ALT, ATTR_MAX_LENGTH, ATTR_NAME, ATTR_ON_BLUR, ATTR_ON_CHANGE, ATTR_ON_CLICK, ATTR_ON_CUT, ATTR_ON_DROP, ATTR_ON_FOCUS, ATTR_ON_KEY_DOWN, ATTR_ON_KEY_PRESS, ATTR_ON_KEY_UP, ATTR_ON_MOUSEDOWN, ATTR_ON_MOUSEOVER, ATTR_ON_PASTE, ATTR_SIZE, ATTR_SRC, ATTR_STYLE, ATTR_TARGET, ATTR_TYPE, ATTR_VALUE, CLASSNAME, FLAG_CHECKED, FLAG_DISABLED, FLAG_MULTIPLE, FLAG_READ_ONLY, FLAG_SELECTED, tagName
 
Constructor Summary
OptionElement()
          Class constructor for OptionElement.
 
Method Summary
 String getDescription()
          Gets the description for this option element.
 String getValue()
          Returns the value corresponding the this option.
 boolean isSelected()
          Gets whether or not this option has the selected flag set.
 String render()
          Output this HTMLElement as a String.
 void render(StringBuffer buffer)
          Renders the opening tag in addition to the option's description.
 void setDescription(String desc)
          Sets the description for this option element.
 void setSelected(boolean value)
          Sets the selected flag for this option.
 void setValue(String value)
          Sets the value for this option.
 
Methods inherited from class com.ibm.hats.transform.html.HTMLElement
addFlag, appendClassName, appendStyle, buildTag, buildTag, getAttribute, getClassName, getDir, getId, getName, getStyle, getTagName, hasFlag, removeFlag, render, render, renderEndTag, renderEndTag, setAlign, setAttribute, setClassName, setDir, setId, setName, setStyle, setTagName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionElement

public OptionElement()
Class constructor for OptionElement. Sets the tag name to option.

Method Detail

render

public String render()
Description copied from class: HTMLElement
Output this HTMLElement as a String. The element is not closed.

Overrides:
render in class HTMLElement
Returns:
String

render

public void render(StringBuffer buffer)
Renders the opening tag in addition to the option's description.

Overrides:
render in class HTMLElement
See Also:
HTMLElement.render()

isSelected

public boolean isSelected()
Gets whether or not this option has the selected flag set.

Returns:
boolean

setSelected

public void setSelected(boolean value)
Sets the selected flag for this option.

Parameters:
value - true to add the flag, false to remove the flag

getDescription

public String getDescription()
Gets the description for this option element.

Returns:
String

setDescription

public void setDescription(String desc)
Sets the description for this option element.

Parameters:
desc -

getValue

public String getValue()
Returns the value corresponding the this option.

Returns:
String

setValue

public void setValue(String value)
Sets the value for this option.

Parameters:
value - The value to set

HATS 7.5.1 (201005110649)