24 Sep 2012 4:02 AM #1
How to use custom type in Model
We'd like to define a custom Ext.data.Type and use this in our Model.
We discovered a problem with the Boolean default type -- in that it is case sensitive. We discovered this while working with an Ajax proxy to a server that returns boolean values as 'True/False'. The Ext.data.Types.BOOL type is case sensitive and treats them all as false. Of course we could define 'convert()' methods for every field sent back from the server (which is what we have done) -- but is would seem preferable to solve this with a sensible type definition.
At first, we thought this was a bug (that BOOL was case sensitive), and files a bug report with the ExtJS forum (http://www.sencha.com/forum/showthre...-casesensitive) -- but they say this is not a bug, and we should prefer to define a custom type.
So we're looking for help with how to refer to this custom type from within SA.
5 Feb 2013 7:53 AM #2
6 Feb 2013 2:38 PM #3
At the moment, the only way to accomplish this would be to do an override and define it in custom code. That would work as an interim solution.
However, in the next point release of Sencha Architect, you could accomplish this via a new feature called processConfig that will help for scenarios like this. ProcessConfig is essentially a hook to the config object prior to instantiation of the class.Steve Sobel
Sencha Architect Development Team