PDA

View Full Version : acces to cmp



aeonmedia
7 May 2010, 12:59 AM
windowMultiple: function(){
//... class...
if (!this.wMultiple) {
this.wMultiple = new Ext.Window({
title: 'Wstaw pytanie z wieloma odpowiedziami',
//...
items: [{
xtype: 'form',
itemId: 'w-multiple',
frame: true,
defaultType : 'field',
items: [{
xtype: 'fieldset',
title: 'Konfiguracja pytania',
autoHeight:true,
items: [
// ...inputs...,
{
xtype:'editorgrid',
frame: true,
itemId: 'ganswer',
id: 'ganswer',
store: new Ext.data.Store({
data: [['Apple',29],['Ext',83]],
reader: new Ext.data.ArrayReader({}, [
{name: 'answer'},
{name: 'point', type: 'float'}
]),
proxy: new Ext.data.MemoryProxy({
root: []
})
}),
// cm...
tbar: [{
text: 'Dodaj odpowied?',
handler : function(){
var gridtest = Ext.getCmp('ganswer');
var grid = this.wMultiple.getComponent('ganswer');
},
scope: this
}],
stripeRows: true,
autoExpandColumn: 'answer',
height: 350,

// config options for stateful behavior
stateful: true,
stateId: 'grid',
viewConfig:{
emptyText:'Dodaj odpowiedzi'
}
}]
}]
gridtest return object
grid not... wtf ?

evant
7 May 2010, 1:05 AM
Examines this container's items property and gets a direct child component of this container.


Also because you didn't post in help ;)

aeonmedia
7 May 2010, 1:49 AM
yeah master i read that but now understand..., Can i use "ref:" and what do it, becouse im lost in this place... im not sure aboute count ref depth (eg ../../ ...)