1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Vancouver, Canada
    Posts
    157
    Vote Rating
    14
    Answers
    5
    el_chief will become famous soon enough

      0  

    Default Unanswered: How do I define a getter on a Model?

    Unanswered: How do I define a getter on a Model?


    I meant to type "How do I define a getter on a Model FIELD?"

    1. it's not convert(), that's actually setter.

    2. it would have to work with BasicForm.loadRecord(), so that I can display the field automatically.

    loadRecord seems to read off of the model.data object

    thanks

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    33
    Vote Rating
    0
    ultra2 is on a distinguished road

      0  

    Default


    override the get function of Ext.data.Model, its my idea, but Iam not expert in Extjs!

    get: function(field) {
    var result = this.callParent(arguments);
    //your code
    return result;
    },

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Location
    Vancouver, Canada
    Posts
    157
    Vote Rating
    14
    Answers
    5
    el_chief will become famous soon enough

      0  

    Default


    Quote Originally Posted by ultra2 View Post
    override the get function of Ext.data.Model, its my idea, but Iam not expert in Extjs!

    get: function(field) {
    var result = this.callParent(arguments);
    //your code
    return result;
    },
    Thanks, but that doesn't work with form.loadRecord()

Thread Participants: 1