1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    9
    Vote Rating
    0
    chrisgd is on a distinguished road

      0  

    Default refresh content of Ext.Window on hide

    refresh content of Ext.Window on hide


    Hello,
    I don´t know how to refresh the content of an Ext.Window. I know, that I could use window.close(); but I use the window inside a popup function and if I try to open the Ext.Window again the Ext.get function can´t load the component any more. I get the firebug message "TypeError: Ext.getCmp(...) is undefined"

    So I just hide the window instead of closing it, but if I open another popup and then the Ext.Window it shows the old content of the feature before.

    Here´s a little bit of code, the popup function and the Ext.Window "inside" the popup:


    function createPopup_3(feature) {
    var gallerycontent =
    "<b>Gallerycontent</b>" + feature.attributes.openshop +
    "<a href='#' onclick='Ext.getCmp(\"picwin\").hide();'>HIDE BOX</a><br>"
    ;
    var picwindow = new Ext.Window({
    id: 'picwin',
    title: feature.attributes.name,
    html: gallerycontent,
    });
    picwindow.on('hide', function() {this.refresh();});
    // How can I "refresh" the html gallerycontent of the Ext.Window on hiding it??? this.update just clears the content

    var popupcontent =
    "<a href='#' onclick='Ext.getCmp(\"picwin\").show();'>SHOW BOX</a><br>"
    ;
    popup_3 = new GeoExt.Popup({
    title: feature.attributes.name,
    feature: feature,
    html: popupcontent,
    });
    popup_3.on({close: function() {
    {selectControl_1.unselect(this.feature)};
    }});
    popup_3.show();
    }

    I hope someone has an idea, some lines of code, the one command I don´t know. Thanks in advance.

    Chris

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default use Update()

    use Update()


    Hello Chris,

    I know, that I could use window.close(); but I use the window inside a popup function and if I try to open the Ext.Window again the Ext.get function can´t load the component any more. I get the firebug message "TypeError: Ext.getCmp(...) is undefined"


    Ext.getCmp results undefined because it can not get any component with your passed id as your window is already destroyed when you have closeed it.

    try to make a new instance when opening it again rather than finding previous one and setting its content.

    However, for your current problem, you may use update function for your window to update its content, just pass your html as an argument.

    sample:-
    yourWindow.update(yourHTML);

    For more info, check this:-
    http://docs.sencha.com/ext-js/3-4/#!...-method-update
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

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