Created
January 31, 2013 18:39
-
-
Save moduscreate/4685157 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| p = new Ext.Panel({ | |
| renderTo : document.body, | |
| itemId : 'mypanel', | |
| height : 200, | |
| width : 500, | |
| frame : true | |
| }); | |
| t = new Ext.form.field.Text({fieldLabel : 'meh'}); | |
| w = new Ext.Window({ | |
| title : 'meh', | |
| border : false, | |
| layout : 'fit', | |
| plain : true, | |
| items : { | |
| xtype : 'form', | |
| items : t | |
| } | |
| }); | |
| p.add(w); | |
| w.show() | |
| // Cannot find the textfield directly | |
| console.log(p.query('textfield')); | |
| // We can find the window though | |
| console.log(p.query('window')); | |
| // Can find if we search for window instance, then textfield | |
| console.log(p.query('window')[0].query('textfield')); | |
| // we can go up though: | |
| console.log(t.up('#mypanel')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment