1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    6
    Vote Rating
    0
    nick_laros is on a distinguished road

      0  

    Default Error loading new content to panel

    Error loading new content to panel


    I have a panel that load some html content, here's the code:
    Code:
    Ext.define('PMK.view.panel.Personalization' ,{
        extend: 'Ext.panel.Panel',
        alias : 'widget.userpersonalization',
        
        autoScroll: true,
        border: false,
        
        initComponent: function() {
            this.autoLoad = ({ url:'page/htmlbio.php', text: 'Loading User Biodata...' });
    
            this.callParent(arguments);
        }
    });
    the autoLoad is working, and then I try to load the panel with newly updated html.
    Code:
    Ext.ComponentQuery.query('userpersonalization').load({
            url:  'page/htmlbio.php',
            scripts: true
    });
    the Ext.ComponentQuery.query('userpersonalization') successfully return the component but I got this error
    Ext.ComponentQuery.query("userpersonalization").load is not a function

    so, can someone explain how to load new content to panel?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,832
    Vote Rating
    609
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    query() returns an array, you need the object reference.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    6
    Vote Rating
    0
    nick_laros is on a distinguished road

      0  

    Default


    thx for the reply, after I add an id config to panel then I use this to reference the object.. it's working

    Code:
            Ext.getCmp('mypanel').getLoader().load({
                    url:  'page/htmlbio.php',
                    scripts: true
            });

  4. #4
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    So you are working with ComponentLoader, then should work panel.getLoader().load()

  5. #5
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    :16, :17 almost

Thread Participants: 2

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