Class: Aurita::GUI::Selection_List_Option_Field

Inherits:
Form_Field show all
Defined in:
lib/aurita-gui/form/selection_list.rb

Instance Attribute Summary

Attributes inherited from Form_Field

#data_type, #form, #hidden, #hint, #invalid, #label, #required, #type, #value

Attributes inherited from Element

#attrib, #force_closing_tag, #parent, #tag

Instance Method Summary collapse

Methods inherited from Form_Field

#disable!, #disabled=, #editable!, #enable!, #hidden?, #hide!, #invalid!, #invalid?, #optional!, #readonly!, #readonly=, #readonly?, #readonly_element, #required!, #required?, #show!, #to_hidden_field, #to_s

Methods inherited from Element

#+, #<<, #[], #[]=, #add_class, #clear_floating, #css_classes, #find_by_dom_id, #get_content, #has_content?, #id, #id=, #method_missing, #recurse, #remove_class, #set_content, #string, #swap, #to_ary, #type=

Methods included from Marshal_Helper_Class_Methods

#marshal_load

Methods included from Marshal_Helper

#marshal_dump

Constructor Details

#initialize(params = {}) ⇒ Selection_List_Option_Field

Returns a new instance of Selection_List_Option_Field.



10
11
12
13
# File 'lib/aurita-gui/form/selection_list.rb', line 10

def initialize(params={})
  params.delete(:selection_list_params)
  super(params)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Aurita::GUI::Element

Instance Method Details

#elementObject



14
15
16
17
18
19
# File 'lib/aurita-gui/form/selection_list.rb', line 14

def element
  HTML.div(:id => "selection_option_#{@attrib[:name]}_#{@value}", :class => :selection_list_option) { 
    HTML.label { @label.to_s } +
    Hidden_Field.new(:value => @value, :name => @attrib[:name].to_s + '_selected[]')
  }
end