ProtoObjectObjectSCXMLElementWrapperSCHtmlInputComponentSCSelectHtmlInput
| options | selectedOptions |
| instance | class |
|---|---|
| initialize private-options request testing value | no messages
|
| options |
|---|
|
| selectedOptions |
|---|
|
|
| initialize |
|---|
| initializeForForm: aForm element: anXMLElement |
super initializeForForm: aForm element: anXMLElement. self initializeOptions. |
| initializeOptions |
options _ (self allElements select: [:each | each name asLowercase = 'option']) collect: [:each | SCSelectOption forSelect: self fromXMLElement: each] |
| private-options |
|---|
| optionSelected: anOption |
selectedOptions _ Array with: anOption |
| selectedOptions |
^selectedOptions ifNil: [selectedOptions _ OrderedCollection new] |
| request |
|---|
| addToRequestStream: aStream |
self selectedOptions do: [:option | option addToRequestStream: aStream] separatedBy: [aStream nextPut: $&] |
| testing |
|---|
| isSelectInput |
^ true |
| value |
|---|
| selectOptionWithText: text |
self selectOptionWithText: text ifNone: [self error: 'No option labeled ' , text.] |
| selectOptionWithText: text ifNone: aBlock |
| option | option _ options detect: [:each | each label = text] ifNone: [^ aBlock value]. option select. |
| value: aValue |
self selectOptionWithText: aValue |