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 SelectElement

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

public class SelectElement
extends HTMLElement

SelectElement is the HTMLElement which represents an HTML form dropdown selection 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:
OptionElement, HTMLElementFactory.createDropdown(ComponentElementList, String), HTMLElementFactory.createDropdown(SelectionComponentElement, String), HTMLElementFactory.createDropdown(SelectionComponentElement, String, int)

Field Summary
static String CLASSNAME
           
 
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, FLAG_CHECKED, FLAG_DISABLED, FLAG_MULTIPLE, FLAG_READ_ONLY, FLAG_SELECTED, tagName
 
Constructor Summary
SelectElement()
          Constructor for SelectElement.
 
Method Summary
 String getOnChange()
          Returns the onChange attribute.
 String getOnFocus()
          Returns the onFocus attribute.
 ArrayList getOptions()
          Returns the options, must consist of OptionElements.
 int getSize()
          Returns the size attribute as an int.
 boolean isMultiple()
          Gets whether or not this select element has the multiple flag set and allows multiple selection.
 String render()
          Renders the opening tag, iterates through and renders all the associated OptionElements.
 void render(StringBuffer buffer)
          Renders the opening tag, iterates through and renders all the associated OptionElements.
 void setMultiple(boolean value)
          Sets the multiple flag for this option.
 void setOnChange(String onChange)
          Sets the onChange attribute.
 void setOnFocus(String onFocus)
          Sets the onFocus attribute.
 void setOptions(ArrayList options)
          Sets the list of options, must consist of OptionElements.
 void setSize(int size)
          Sets the size attribute.
 
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
 

Field Detail

CLASSNAME

public static final String CLASSNAME
See Also:
Constant Field Values
Constructor Detail

SelectElement

public SelectElement()
Constructor for SelectElement. Sets the tag name to select. Initialized the list of options.

Method Detail

render

public void render(StringBuffer buffer)
Renders the opening tag, iterates through and renders all the associated OptionElements.

Overrides:
render in class HTMLElement
Parameters:
buffer -

render

public String render()
Renders the opening tag, iterates through and renders all the associated OptionElements.

Overrides:
render in class HTMLElement
Returns:
String

getOnChange

public String getOnChange()
Returns the onChange attribute.

Returns:
String

setOnChange

public void setOnChange(String onChange)
Sets the onChange attribute.

Parameters:
onChange - The onChange to set

getOnFocus

public String getOnFocus()
Returns the onFocus attribute.

Returns:
String

setOnFocus

public void setOnFocus(String onFocus)
Sets the onFocus attribute.

Parameters:
onFocus - The onFocus to set

getSize

public int getSize()
Returns the size attribute as an int.

Returns:
int size attribute, or -1 if the attribute cannot be parsed

setSize

public void setSize(int size)
Sets the size attribute.

Parameters:
size - The size to set

isMultiple

public boolean isMultiple()
Gets whether or not this select element has the multiple flag set and allows multiple selection.

Returns:
boolean

setMultiple

public void setMultiple(boolean value)
Sets the multiple flag for this option.

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

getOptions

public ArrayList getOptions()
Returns the options, must consist of OptionElements.

Returns:
ArrayList

setOptions

public void setOptions(ArrayList options)
Sets the list of options, must consist of OptionElements.

Parameters:
options - The options to set

HATS 7.5.1 (201005110649)