Method: SWS::MultipleSelectionList#process_bindings
- Defined in:
- lib/sws/component.rb
#process_bindings ⇒ Object
#if ( selections == nil ) #nothing is selected - return empty array #@slots.value = Array.new() #else #WARNING: selections will be an Array if multiple and a single object if not selected = Array.new() #if we have single selection, make it an Array selections = [selections] unless ( selections.is_a? (Array) ) #in the selections array we have indices of elements in “list” array selections.each { |sel| selected << list } @slots.value = selected end end
645 646 647 648 649 650 651 |
# File 'lib/sws/component.rb', line 645 def process_bindings () if ( @parameters["selections"] ) self.selections = @parameters["selections"] else self.selections = nil end end |