1. #1
    Sencha User
    Join Date
    Apr 2008
    Posts
    5
    Vote Rating
    0
    vamadou is on a distinguished road

      0  

    Default Add a computed field on a Model

    Add a computed field on a Model


    Hi,

    I have probably overlooked this one but I can't find how to add a "computed" field on a store via the Designer. By computed I mean the 'fullname' field in the example below:

    Code:
    Ext.define('app.model.User', {
        extend: 'Ext.data.Model',
        config: {
            fields: ['firstName', 'middleName', 'lastName']
        },
    
        fullName: function() {
            var d = this.data,
            names = [
                d.firstName,
                d.middleName,
                d.lastName
            ];
            return names.join(" ");
        }
    });
    Could you help me ?
    Thanks a lot
    Regards

    Vincent

  2. #2
    Sencha User
    Join Date
    Apr 2008
    Posts
    5
    Vote Rating
    0
    vamadou is on a distinguished road

      0  

    Default


    Just opened my eyes ... a simple "Basic Function" drag and drop to the model does the trick.
    Sorry for the noise.

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    You should be able to use convert function available on a field.
    Bharat Nagwani
    Sencha Designer Development Team

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi