PDA

View Full Version : Undocumented FormPanel and XmlReader config properties?



aryairani
2 Mar 2011, 12:55 PM
The "Ajax with XML forms" example:

( http://dev.sencha.com/deploy/dev/examples/form/xml-form.html
http://dev.sencha.com/deploy/dev/examples/form/xml-form.js
http://dev.sencha.com/deploy/dev/examples/form/xml-form.xml )

shows a 'reader' config property for FormPanel, as well as a 'success' config property (not 'successProperty') for XmlReader.

However, http://dev.sencha.com/deploy/dev/docs/output/Ext.data.XmlReader.html doesn't list 'success', and I don't see any mention of 'reader' in the FormPanel docs or related docs.

Where are these documented, or what gives?

Thanks!
Arya

fay
2 Mar 2011, 1:25 PM
The 'reader' config is described in the BasicForm (http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.BasicForm&member=reader) documentation. A FormPanel (http://dev.sencha.com/deploy/dev/docs/?class=Ext.form.FormPanel) will always implement a BasicForm, so this is just a 'shortcut' to the BasicForm's config. From the docs:



Although not listed as configuration options of FormPanel, the FormPanel class accepts all of the config options required to configure its internal Ext.form.BasicForm (http://dev.sencha.com/deploy/dev/docs/output/Ext.form.BasicForm.html)...


You'll find this type of "shortcut" in different areas of ExtJS, e.g., you can specify JsonReader config options when declaring a JsonStore.

'success' was the name of the config option in Ext JS 2.x; I can't remember when it was deprecated, but I think 'successProperty' was introduced along with totalProperty\messageProperty, etc. Obviously, the XML Forms example should be updated to use the 'successProperty'. When you come across something like this, you can post a "documentation bug" here (http://www.sencha.com/forum/forumdisplay.php?41-Ext-Bugs).

aryairani
2 Mar 2011, 1:51 PM
You'll find this type of "shortcut" in different areas of ExtJS, e.g., you can specify JsonReader config options when declaring a JsonStore.

Yeah I had seen it for JsonStore, but couldn't find it here until you pointed it out.


When you come across something like this, you can post a "documentation bug" here (http://www.sencha.com/forum/forumdisplay.php?41-Ext-Bugs).

Will do; thanks Fay.

-Arya