1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default Loading data to Ext.FormPanel from store.

    Loading data to Ext.FormPanel from store.


    I have a store and FormPanel. And i want to show data from store in panel.
    If i do this:
    Code:
     var store_form=null; 
     store_form = new Ext.data.Store({                        
       url: url_servlet+"kadastr_zemform.jsp",        
        reader: new Ext.data.XmlReader({
             totalProperty: "results", 
             record: "contact", 
              fields: [        ]}),
               listeners: {         
               'load' :  function(store_form,records,options) {
                        this.loaded = true; 
                       var record = store_form.getAt(0);                                                 podform.getForm().loadRecord(record);                
                          }            
             }     
         });     
     }); 
    store_form.load();
    All froms fine.
    But if i call loadRecord() in formPanel's listener i get error:

    Code:
    TypeError: store_form.getAt is not a function 
    (624 out of range 31)
    My code.

    Code:
    var podform = new Ext.FormPanel({
         labelAlign: 'left',
         id: 'tab_6',
         frame:true,
         title: 'Договоры подряда',
         bodyStyle:'padding:5px 5px 0',
         width: 600,
         listeners: {
             'activate' :  function(store_form,records,options) { 
            console.log("store:"+store_form);
             this.loaded = true;
             //alert("loaded");
             //console.log(store.getAt(0)); 
            var record = store_form.getAt(0); 
            podform.getForm().loadRecord(record);
             }
         }, 
         fields[]
      });
    Whats wrong with it?

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Posts
    3
    Vote Rating
    2
    johnfanyong is on a distinguished road

      1  

    Default


    FromPanel activate : ( Ext.Panel p )
    the first param of activate listener is Ext.Panel.It's not store

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    45
    Vote Rating
    0
    maxkliver is on a distinguished road

      0  

    Default


    Thank you its works.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar