1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    64
    Vote Rating
    6
    jim@carroll.net is on a distinguished road

      0  

    Default How to use custom type in Model

    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.

    Thanks
    Jim

  2. #2
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    64
    Vote Rating
    6
    jim@carroll.net is on a distinguished road

      0  

    Default


    bump?

  3. #3
    Sencha - Architect Dev Team
    Join Date
    Jul 2012
    Posts
    300
    Vote Rating
    28
    honestbleeps has a spectacular aura about honestbleeps has a spectacular aura about

      1  

    Default


    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
    @honestbleeps
    Sencha Architect Development Team

Thread Participants: 1