Class: ExtRadio

Inherits:
ExtNode show all
Includes:
FormField, Magic::InputValue
Defined in:
lib/extclasses/radio.rb

Constant Summary collapse

@@ALIAS_CONFIG =
{
  :text => :boxLabel
}

Instance Attribute Summary

Attributes inherited from ExtNode

#childs, #config, #deep_lvl, #default_config, #parent, #xtype

Instance Method Summary collapse

Methods included from Magic::InputValue

included

Methods included from FormField

included

Methods inherited from ExtNode

#add_child, #apply_config, before_to_extjs, #build_abstract_function, #child_of?, #child_of_form?, #collect_events, #collect_ref, #conv_id_to_label, #conv_id_to_name, #conv_id_to_ref, #do_alias_config, #do_layout, #find, #find_field_elements, #find_parent, #get_all_siblings, get_before_filters, #get_deep, get_events, get_refs, #has_child?, #is_field_element?, #override_config, #prepare_config, #remove_childs, #remove_config, reset_generator_config, #root?, set_generator_config, #set_parent

Constructor Details

#initialize(config, parent) ⇒ ExtRadio

Returns a new instance of ExtRadio.



9
10
11
12
13
14
15
16
# File 'lib/extclasses/radio.rb', line 9

def initialize(config, parent)
  @default_config = {
    :labelWidth => 100,
    :hideLabel => true
  }
  
  super "radiofield", config, parent 
end

Instance Method Details

#to_extjs(at_deep = 0) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/extclasses/radio.rb', line 18

def to_extjs(at_deep = 0)
  if parent.xtype == "radiogroup" 
    name = parent.config[:name]
    config[:name] = name
  end
  super at_deep
end