Hello!
I have a FormField and want to know which form it belongs. How can this be done?
In fact I need to know when the form is being submitted and want to hook an the onSubmit-event.
use http://extjs.com/deploy/dev/docs/?class=Ext.Component&member=findParentByType to fnid the owning FormPanel.
Works great! :D/
You could try:
var form = field.findParentBy(function(c){ The beginnings of Galois theory:: Thus, the algebraic numbers form a field. (I have not proved that -a is algebraic if a is. . We want to show that 1 belongs to its image. http://www.dpmms.cam.ac.uk/~wtg10/galois.htmlHOME |
return c.isXType == 'form';
});
var form = field.findParentBy(function(c){
return c instanceof Ext.form.FormPanel; A Physical, Historical, Political & Descriptive Geography - Google Books Result:: href=http://books.google.com/books?id=z2dDAAAAIAAJ&pg=PA160&lpg=PA160&dq=Which+form+a+field+belongs+to%3F&source=web&ots=k8SqRPb0TM&sig=YjXm5ED6QLia8DMQumQ1nlSaL04&hl=en&sa=X&oi=book_result&resnum=31&ct=result class=l onmousedown=return clk(http://books.google.com/books?id=z2dDAAAAIAAJ&pg=PA160&lpg=PA160&dq=Which+form+a+field+belongs+to%3F&source=web&ots=k8SqRPb0TM&sig=YjXm5ED6QLia8DMQumQ1nlSaL04&hl=en,,,res,41,)>A Physical, Historical, Political & Descriptive Geography - Google Books Resultby Keith Johnston, Augustus Henry Keane - 1908 - Geography - 491 pagesThe name field, which is applied to most of the Scandinavian mountain groups, which last belongs to the " continental " system of drainage, http://books.google.com/books?id=z2dDAAAAIAAJ&pg=PA160&lpg=PA160&dq=Which+form+a+field+belongs+to?&source=web&ots=k8SqRPb0TM&sig=YjXm5ED6QLia8DMQumQ1nlSaL04&hl=en&sa=X&oi=book_result&resnum=31&ct=resultHOME |
});
Thanks for your reply. This seems to work on forms which are create with an xtype set. But when you create the form with new, getXType seem to return undefined.
But it works now - so perhaps there is no need to bother anymore ;-)
Thanks for your reply!
This works, but limits you to a certain form-class, which means asking for Ext.form.FormPanel will not work for a FormPanel-class which has been extended from Ext.form.FormPanel. Is there a general approach?
Nortel Unveils Vision, Strategy for Israeli High-Performance Net
Busy Friday Leads to Strong Close for Net Stocks
|