View Full Version : what's the difference between formpanel and formpanel.form?

15 Aug 2011, 10:23 PM
hi all,
i come across some problems when i programming with extjs3.3.1?
here are the codes:

var _form = new Ext.FormPanel({....});
_form.form.load(....); //-->1
_form.load(....); //-->2


i want to know what's the difference between "line 1" and "line 2".
i am a extjs noob..thanks in advance.

16 Aug 2011, 8:06 AM
FormPanel is the ExtJS widget, styled to match the framework.

FormPanel.form is the Ext.form.BasicForm class. It is basically the underlying HTML form used for HTTP submission.

FormPanel.load() and FormPanel.form.load() are the same thing - the FormPanel has load() and reset() methods as a convenience (so you don't have to get the ".form" property), but they do exactly the same thing.

17 Aug 2011, 11:49 PM
i got it, thank you