Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Oct 2010
    Posts
    2
    Vote Rating
    0
    ecb0628 is on a distinguished road

      0  

    Default Direct Store Dynamic Synchronous Loading: Major help needed

    Direct Store Dynamic Synchronous Loading: Major help needed


    Hi,

    I am trying to load a js page/object that extends FormPanel as such:
    Application.FeatureDetailForm = Ext.extend(Ext.FormPanel, { ... }


    I am using DirectJNgine services. This FormPanel uses one service (let's call it ServiceA) to load non-dynamic data (only one piece of information per record) and it is stored into form objects like textFields. However, I also have DYNAMIC data that I want to load into fieldsets (each fieldset will contain numerous textFields). This information will be accessed from a different service; let's call it ServiceB. In order to do this, I am using a DirectStore to load the data from ServiceB. Let's call it StoreB.

    In order to populate the FormPanel, I use the var config within initComponent. Within the item's property of the config is where I define all the UI elements of the FormPanel. In the middle of the objects is where I want to insert the dynamic fieldsets from StoreB. To do so, I decide to use the load callback function from the DirectStore. It returns the information perfectly into an array of fieldsets.

    PROBLEM!!! It seems like the config creates the UI items BEFORE the store will load. Now, it is impossible to get the information returned from StoreB's load callback function. Even if I define a function that only calls load and returns the array into the items property, the initComponent will build the UI items without calling load, and load will be called afterwards.

    My coworkers are insisting that this happens because load is asynchronous. I've tried over and over again to figure out how to load the DirectStore SYNCHRONOUSLY, but after hours of ExtJS-induced headaches, I don not know where else to turn to. It seems like the only way to load data synchronously is through ServiceA (no good) or by using the store property of combo-boxes (not what I want).

    Any help is appreciated. I can try to leave code snippets upon request.

    -__-

  2. #2
    Sencha User
    Join Date
    Jul 2008
    Posts
    53
    Vote Rating
    0
    jash is on a distinguished road

      0  

    Default


    I have a similar problem,

    When I draw a tab, I do not know what data there is for this customer...

    So I need to query the database first, wait for the result and add formpanels. I have a solution but with some unwanted side effects I am currently investigating.

    PHP Code:
                                Algemeen.removeAll(); // 'algemeen is a tabPanel with id 'alegemeen'
                                
    Algemeen.add(CompanyForm);
                                var 
    cmpny Ext.ModelManager.getModel('Affiliation.model.Company')
                                
    cmpny.load(3,
                                {
                                    
    success : function(Company)
                                        {
                                            
    CompanyForm.getForm().loadRecord(Company); 
                                        }
                                });
                                
                                var 
    NLAddress Ext.create('Ext.data.Store',{model 'Affiliation.model.NLPostalAddress',autoLoad true filters: [{property 'AffiliationId'value 3}]});
                                
    NLAddress.on('load', function()
                                {
                                    
    NLAddress.each(
                                        function(
    Record)
                                        {
                                            
    ADR Ext.create('Affiliation.view.NLPostalAddressForm',{trackResetOnLoad true})
                                            
    ADR.getForm().loadRecord(Record)
                                            
    Ext.getCmp('Algemeen').add(ADR)
                                        });
                                });
                                
                                var 
    TelephoneNumbers Ext.create('Ext.data.Store',
                                {
                                    
    model 'Affiliation.model.TelephoneNumber',
                                    
    autoLoad true ,
                                    
    filters: [{property 'AffiliationId'value 3}],
                                    
    listeners : {
                                        
    load : function()
                                        {
                                            
    this.each(
                                                function(
    Record)
                                                {
                                                    
    Telephone Ext.create('Affiliation.view.TelephoneNumberForm',{trackResetOnLoad true})
                                                    
    Telephone.getForm().loadRecord(Record)
                                                    
    Ext.getCmp('Algemeen').add(Telephone)
                                                });
                                        }
                                    }
                                    });

    and 
    so on for faxnumberetc
    Within my case, all the formpanels are created but:

    the first one (NLPostalAddress) is rendered fine.

    the second one Is rendered fine, but when the 3rd one is loaded, the contents of the 2nd one is suddenly removed from its box.... weird

    the last one stays (as no other one is rendered after it)

    I do not have multiple "same" records at the moment so do not blame it on reusing ADR or Telephone in the loop....

    It seems every day I spoil a lot of time on weird issues... again I blame the docs for that.

    Jash

Similar Threads

  1. Replies: 0
    Last Post: 26 Aug 2010, 3:57 AM
  2. Synchronous store save?
    By Baris in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 15 Jun 2010, 7:20 AM
  3. 'Dynamic' store loading
    By Wolfie in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 8 Jan 2010, 1:49 PM
  4. Using Ext.Direct with GroupingStore help needed
    By geewhizbang in forum Ext.Direct
    Replies: 1
    Last Post: 8 Aug 2009, 8:55 AM

Thread Participants: 1

Tags for this Thread