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 | |
disabled | Helper method to disable this option. |
selected | Helper method to set this option on. |
Properties inherited from class BaseDom | |
childTypeList | |
children | |
eattr | |
hname | |
parent | |
profile | Meta-profiles. |
text | |
Methods inherited from class BaseDom | |
render | |
st_makesep |
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() )
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() )