Wednesday, 14 August 2013

Migration from getCmp

Migration from getCmp

I use getCmp wherever is possible in my application, but now I want to
migrate from this poor-style programming to a better way of referencing
elements. Imagine, I now have an element with itemId set to "myitemId" and
I want to reference it from any part of the script, I do not want to use
up or down methods, because I want to have a uniform way of referencing an
element like Ext.getCmp. I tried to use
Ext.ComponentQuery.query("myitemId") and Ext.query("#myitemId") as an
alternative to Ext.getCmp("myitemId"), but to no avail. So, what is the
right method and right syntax to use?

No comments:

Post a Comment