1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    84
    Vote Rating
    0
    koolll is on a distinguished road

      0  

    Default Unanswered: Not able to get store in formpanel

    Unanswered: Not able to get store in formpanel


    I has define store in sencha touch as follow:

    store.js


    Code:
          Ext.define('bluebutton.store.BlueButton.Testing', {
            extend: "Ext.data.Store",
            requires: [
                      'bluebutton.model.BlueButton.Testing'
            ],
            config: {
                storeId: 'testingstore',
                model: 'bluebutton.model.BlueButton.Testing'
            }
        });
    Model.js

    Code:
      Ext.define('bluebutton.model.BlueButton.Testing', {        extend: 'Ext.data.Model',
        
            requires: [
                     'Ext.data.proxy.LocalStorage'
            ],
        
            config: {
                fields: [
                    { name: 'first', type: 'string' },
                    { name: 'second', type: 'string' }
                ],
                proxy: {
                    type: 'localstorage',
                    id: '_codeAnalyzerLocalStorage'
                }
            }
        });
    I need to call getStore()
    Code:
            Ext.define('bluebutton.view.BlueButton.testing', {
            extend: 'Ext.form.Panel',
            xtype: 'testing',
               requires: [
          
            'bluebutton.view.BlueButton.TransactionList',
            'bluebutton.view.BlueButton.MemberPopUp',
             'bluebutton.view.BlueButton.MemberDetail',
             'bluebutton.store.BlueButton.MemberList',
        
             'bluebutton.model.BlueButton.Testing',
             'bluebutton.store.BlueButton.Testing'
        
        
        
               
            ],
          
            config: {
             id:'register',
                items :[
                   
                      {
                            xtype: 'textfield',
                            name: 'name',
                            label: 'Name'
                        },
                        {
                            xtype: 'emailfield',
                            name: 'email',
                            label: 'Email'
                        },
                      
                        
        
                        {
                            
                            xtype: 'button',
                            text: 'Test Local',
                             handler: function(button) {
                                
                               
                               var test =   Ext.getCmp('testingstore').getStore();   
                              
                               alert(test);
        
        
                                
        
                               
                               }
        
        
        
        
                        },
        
        
                        
        
                        
                        
                        
        
        
                ],
        
        
           }
        
        });
    But I get this error getStore is undefined .Please help. Thanks

  2. #2
    Sencha User
    Join Date
    May 2012
    Posts
    32
    Answers
    2
    Vote Rating
    1
    A.Tyshchyk is on a distinguished road

      0  

    Default


    If you want to get store by its id you should use StoreManager

    Code:
    Ext.data.StoreManager.get('testingstore')
    If you want to get component's store you must use component's id
    Code:
    Ext.getCmp('register').getStore();

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