1. #1
    Ext JS Premium Member
    Join Date
    Oct 2010
    Location
    Freiburg
    Posts
    23
    Answers
    1
    Vote Rating
    1
    chrisjs is on a distinguished road

      0  

    Default Answered: ModelManager gives me function()

    Answered: ModelManager gives me function()


    Hello,

    i want to get the fields from a model in order to build a dynamic search window. The search needs to know, which fields it should use.
    I try to use ModelManager to get the model.

    I have set a breakpoint in my controller. When i enter
    Code:
    Ext.ModelManager.getModel('onlineplus.AccountManager.model.User')
    in Firebug, i always get just
    Code:
    function()
    When i examine Ext.ModelManager it shows (pic in attachment)

    Is this the right way to get a list of the fields from my model?
    Attached Images

  2. Ext.ModelManager.getModel() return model class, which is in fact an instance of Function. The code below shows how to refer to the fields of a model:
    Code:
    var model = Ext.ModelManager.getModel('onlineplus.AccountManager.model.User');
    console.log(model.prototype.fields);

  3. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Ext.ModelManager.getModel() return model class, which is in fact an instance of Function. The code below shows how to refer to the fields of a model:
    Code:
    var model = Ext.ModelManager.getModel('onlineplus.AccountManager.model.User');
    console.log(model.prototype.fields);

Thread Participants: 1

Tags for this Thread

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