Class: UU::OS::Form::Choice

Inherits:
Input show all
Defined in:
uu_os_gvc-0.28.16/lib/uu/os/form/choice.rb

Overview

choice component

Instance Attribute Summary (collapse)

Attributes inherited from Input

#data, #disabled, #read_only, #required, #submit_value_change, #value, #value_change_action_uri, #width

Attributes inherited from GVC::Component

#attributes, #code, #component_type, #form, #height, #id, #name, #width

Method Summary

Methods inherited from GVC::Component

#add_message, #focus, #initialize, #messages

Constructor Details

This class inherits a constructor from UU::OS::GVC::Component

Instance Attribute Details

- (Object) item_list

JSON with list of items for choice component. Items are not sorted and in component is showed in written order. Each item is a key - value pair.

Examples:

# set new list of items into item_list of choice component 
choice.item_list = [
  {""=>"Choose value"},
  {"1"=>"First Item"},
  {"2"=>"Second Item"}
]


20
21
22
# File 'uu_os_gvc-0.28.16/lib/uu/os/form/choice.rb', line 20

def item_list
  @item_list
end