Results 1 to 9 of 9

Thread: Change window location

  1. #1

    Default Change window location

    Hi everyone,
    I am a starter of EXT. I have a code which create a Ext.window inside.
    Something as shown below
    Code:
    Ext.getCmp('tempField').add(new Ext.Window({
    id:'edit',
    width:650,
    height:550,
    items:[{
    .....
    }]
    }));
    right now, when I want to refresh the "edit" window by using the code
    Code:
    window.location.reload()
    it will reload the whole page.
    Is there any way to change the window location to the "edit" window.
    I really appreciate for your help.
    Thanks

  2. #2
    Sencha Premium User StuartAshworth's Avatar
    Join Date
    Feb 2009
    Location
    Glasgow, Scotland
    Posts
    418

    Default

    You will need to use an Ajax request (or just reload the Store if you are using a grid) to refresh the contents of the Ext Window.

    How are you loading data into the window originally? What components are within the items collection?

  3. #3
    Ext JS Premium Member griffiti93's Avatar
    Join Date
    Mar 2007
    Location
    Owasso, OK
    Posts
    130

    Default

    Grab reference to your Ext window. Next, grab a reference to it's Update object. The call the update() method.

    Code:
    var window = Ext.getCmp('edit');
    var updater = window.getUpdater();
    
    updater.update({url: 'somepage.html'});
    References:
    Ext.Window
    Ext.Updater

  4. #4

    Default

    hi guys,
    Thanks for your fast replies.
    I have the problem with the store ordering which only refreshing a whole page will solve the problem.
    Basically, I put a sortable-columns grid inside the Window.
    Something like below
    Code:
    Ext.getCmp('tempField').add(new Ext.Window({
                            id:'edit',
                            width:650,
                            height:550,
                            items:[{
                                xtype:'grid',
                                id: 'display',
                                store: storeEG,
                                cm: colModel
                            }]
                        }));    
                        Ext.getCmp('edit').show();
    I need to reload that window in order for the grid regain the order given by the database.

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Uh!

    Reload the Window??????

    Reload the Store!

    And how are you HOPING that the grid gets sized within that Window?

  6. #6

    Default

    hi,
    I have a resizing function
    Code:
    function resizing()
    {
        Ext.getCmp('mainForm').setWidth(Ext.getBody().getViewSize().width);
        Ext.getCmp('mainForm').setHeight(Ext.getBody().getViewSize().height);
        Ext.getCmp('display').setWidth(Ext.getBody().getViewSize().width-50);
        Ext.getCmp('display').setHeight(Ext.getBody().getViewSize().height-200);
    }
    like that the grid will fit into that window.It is like pop-up actually. And I just want to refresh that pop-up window

  7. #7
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,676

    Default

    uh - unnecessary. Use a layout!
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  8. #8

    Default

    hi guys,
    thank you very much for paying your time for a starter
    I am solving a requirement from my senior which I need to do something like that
    If there is a solution on how to change the window location, please let me know

  9. #9
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    You have been told the answer to all your questions in this thread.

    You just need to read the answers.

Similar Threads

  1. window.location alternative?
    By The0s in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 13 Sep 2011, 2:15 AM
  2. How to change location of x-layout-panel
    By Morpio in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 11 Feb 2008, 5:47 AM
  3. Window confusion on location
    By AntonioCS in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Dec 2007, 6:55 AM
  4. window.location(document.location) in Grid's listener
    By SunLiWei in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 26 Sep 2007, 6:31 AM
  5. Change location of MessageBox?
    By jpaulus in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 21 Sep 2007, 12:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •