PDA

View Full Version : Ext.ModelManager



ccrosetti
22 Jun 2013, 12:38 PM
Hi, am I reading old docs?

Ext.ModelManager.create(...) returning void?

Thie text below is from Ext JS 4 docs.


Methods (http://www.objis.com/formationextjs/lib/extjs-4.0.0/docs/api/Ext.ModelManager.html#method-create)Ext.ModelManager (http://www.objis.com/formationextjs/lib/extjs-4.0.0/docs/api/Ext.ModelManager.html)
view source (http://www.objis.com/formationextjs/lib/extjs-4.0.0/docs/source/ModelManager.html#Ext-ModelManager-method-create)

create (http://www.objis.com/formationextjs/lib/extjs-4.0.0/docs/api/Ext.ModelManager.html#)( Object data, String name, Number id) : void

Creates a new instance of a Model using the given data.

slemmon
23 Jun 2013, 9:58 PM
Here's where create is documented from Sencha's website:
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.ModelManager-static-method-create

If your model looked like:

Ext.define('MyApp.model.MyModel', {
extend: 'Ext.data.Model',
fields: ['foo', 'bar']
});

You'd create an instance like:

MyApp.model.MyModel.create({
foo: 'foo value',
bar: 'bar value'
});