PDA

View Full Version : xtype for other exiting Ext componnents



kaos17
29 Nov 2010, 12:13 PM
I am writing an application which stores the Ext objects in a database I am retrieving the configuration from the server and rendering the objects. I want to manupulate the object configuration prior to adding them to the container. Is there a way of adding xtypes for things like?:

store: {
autoDestroy: true,
url: 'plants.xml',
reader: {
record: 'plant',
fields: [
{name: 'common', type: 'string'},
]
}),

I'm string to lazy render all of the components. I've tried :

Ext.reg('xmlreader',Ext.data.XmlReader);


store: {
autoDestroy: true,
url: 'plants.xml',
reader: {
xtype: 'xmlreader',
record: 'plant',
fields: [
{name: 'common', type: 'string'},
]
},

but to no avial... any thoughts?

Condor
30 Nov 2010, 12:32 AM
stores and readers are not Ext.Components, so they don't really have an xtype.

You would need to patch Ext.data.Store to make it support xtypes for proxies and readers.

ps. This will actually be supported in Ext4.

kaos17
30 Nov 2010, 7:23 AM
Any idea how much work it would take to patch Ext to support Xtypes for everything so that I can manipulate and savec the JS objects prior to rendering them? When is Ext 4 due to be released? do you know of any resources that could help us out with this?

Thanks

Condor
30 Nov 2010, 8:05 AM
Ext 4 beta: December/January 2011
Ext 4 final: March 2011