Class: Ext::Panel

Inherits:
Component show all
Defined in:
lib/selenium-extjs/component/Panel.rb

Direct Known Subclasses

FieldSet, Form, TabPanel

Instance Attribute Summary collapse

Attributes inherited from Component

#parent

Instance Method Summary collapse

Methods inherited from Component

#getId, #highlight, #initialize, #method_missing, #node, #selector, #wait_for_ajax

Constructor Details

This class inherits a constructor from Ext::Component

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ext::Component

Instance Attribute Details

#itemsObject (readonly)

Returns the value of attribute items.



4
5
6
# File 'lib/selenium-extjs/component/Panel.rb', line 4

def items
  @items
end

Instance Method Details

#init_componentObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/selenium-extjs/component/Panel.rb', line 6

def init_component()
 @items = []
 total = @selenium.get_eval("(window.Ext.getCmp('#{@id}').items)?(window.Ext.getCmp('#{@id}').items.length):0").to_i
 total.times().each do |n|
    cmp = get(n)
    cmp.parent = self
   @items << cmp
    # p cmp
    #Ext::build_cmp(@selenium.get_eval("window.Ext.getCmp('#{@id}').get(#{n}).getId()"), self)
  end
end

#titleObject



18
19
20
# File 'lib/selenium-extjs/component/Panel.rb', line 18

def title
  @selenium.get_eval("window.Ext.getCmp('#{@id}').title")
end