Zimlet JavaScript API Reference - DwtSelectOption

Class DwtSelectOption


This class encapsulates the option object that the DwtSelect widget uses.

Defined in: DwtSelect.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtSelectOption(value, selected, displayValue, owner, optionalDOMId, selectedValue, hr, extraData, extraData, id)
Creates a select option.
Method Summary
Method Attributes Method Name and Description
 
De-selects the option.
 
Gets the display value.
 
Gets the id.
 
Gets the image.
 
getItem(menuItem)
Gets the item.
 
Gets the selected value.
 
Gets the value.
 
Checks if the option is selected.
 
Selects the option.
 
setItem(menuItem)
Sets the item.
 
setValue(stringOrNumber)
Sets the value.
Class Detail
DwtSelectOption(value, selected, displayValue, owner, optionalDOMId, selectedValue, hr, extraData, extraData, id)
Creates a select option.
Parameters:
{String} value
this is the value for the object, it will be returned in any onchange event
{Boolean} selected
whether or not the option should be selected to start with
{String} displayValue
the value that the user will see (HTML encoding will be done on this value internally)
{DwtSelect} owner
not used
{String} optionalDOMId
not used
{String} selectedValue Optional
the text value to use when this value is the currently selected value
{Boolean} hr
True => This option will be usd to create a unselectable horizontal rule
{Object} extraData
map of extra name/value pairs
extraData
id
Method Detail
deSelect()
De-selects the option.

{String} getDisplayValue()
Gets the display value.
Returns:
{String} the display value

{String} getIdentifier()
Gets the id.
Returns:
{String} the id

{String} getImage()
Gets the image.
Returns:
{String} the image

{DwtSelectMenuItem} getItem(menuItem)
Gets the item.
Parameters:
menuItem
Returns:
{DwtSelectMenuItem} the menu item

{String} getSelectedValue()
Gets the selected value.
Returns:
{String} the selected value

{String} getValue()
Gets the value.
Returns:
{String} the value

{Boolean} isSelected()
Checks if the option is selected.
Returns:
{Boolean} true if the option is selected

select()
Selects the option.

setItem(menuItem)
Sets the item.
Parameters:
{DwtSelectMenuItem} menuItem
the menu item

setValue(stringOrNumber)
Sets the value.
Parameters:
{String|Number} stringOrNumber
the value

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:29 GMT-0400 (EDT)