21.97Class Option

Single choice of a Select menu.

Class Option( text, [value],[label],[selected],[disabled] ) from \
                 BaseDom(( "option", nil, OptionAttribs))
text Text of the component.
value The value to be sent in the form if selected -- defaults to text
label The text to be displayed in the menu -- defaults to text
selected true to mark this option as selected.
disabled Set to true to shade the option.

Even if both value and label are defined, the text element can still be used, for example to display hints by browsers.

Properties
text
Methods
disabledHelper method to disable this option.
selectedHelper method to set this option on.
Properties inherited from class BaseDom
childTypeList
children
eattr
hname
parent
profileMeta-profiles.
text
Methods inherited from class BaseDom
render
st_makesep

Properties

text

Methods

disabled

Helper method to disable this option.

disabled()

Return the self object so it's possible to do


      s = Select("the select").add(
            Option( "the option" ).disabled()
         )

selected

Helper method to set this option on.

selected()

Return the self object so it's possible to do


      s = Select("the select").add(
            Option( "the option" ).selected()
         )
Made with http://www.falconpl.org