I need to know that box exponent is present in an ext formPanel to take some actions ... is there any way Know that? Something like this:
if (getElementById ("boxId")! = 'Undefined') {warning ('exists'); }
Common pattern that most people use it: < Pre> var myBoxCmp = Ext.getCmp ('cmpId'); If (myBoxCmp) {myBoxCmp.doSomething (); }
The only thing for elements:
var el = Ext.get ('elId'); If (L) {el.doSomething (); }
You can also use methods such as container.findById , but if you have an ID (assuming it's unique, it should be Should only) GetCmp .
EDIT: Many years have passed since this original answer, and nowadays getCMP is usually frowned upon as one and generally applications are global references, which Usually indicating poor design when they are needed).
P>
Comments
Post a Comment