PDA

View Full Version : Exclude Ext.data.Model Id during Load



mhenshaw
23 Feb 2015, 3:15 PM
How does one remove Ext.data.Mode.id() from being appened to an URI during load(...) method?

I am requesting using params since idProperty does not support tuples, so this default behavior is useless.

joel.watson
28 Feb 2015, 5:53 AM
How does one remove Ext.data.Mode.id() from being appened to an URI during load(...) method?

I am requesting using params since idProperty does not support tuples, so this default behavior is useless.

Are you using a Rest proxy? If so, check out setting appendId to false:

http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.data.proxy.Rest-cfg-appendId

Thanks
Joel

mhenshaw
2 Mar 2015, 8:54 AM
Proxy is AJAX and appendid is only for REST. The big issues is that Model has no Id field but yet the infrastructure still assigns and Id. The closest to an Id is the tuple but Model cannot handle an Id formed via tuple.

mhenshaw
2 Mar 2015, 9:11 AM
Defining getId() to only return undefined works.


Ext.define('MyApp.model.MyModel', {
getId: function() {

return undefined;


}

});