Results 1 to 7 of 7

Thread: Refresh one region in BroderLayout

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Moscow
    Posts
    137

    Default Refresh one region in BroderLayout

    How can i refresh contents of only one region (south) of the ViewPort with BorderLayout specified?

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

    Default

    What would refresh mean in this context? Reload the Store of a GridPanel or DataView? Reload a TreePanel?

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Moscow
    Posts
    137

    Default

    Refresh content of a panel in region.

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

    Default

    Well you have http://extjs.com/deploy/dev/docs/?cl...el&member=load But that's horrible. It just throws whatever returns from the server into the innerHTML of the Panel's body which is crap. Obviously you don't want HTML in your Ext app do you?

    What you want is to use the Panel as a Container, and refresh whatever controls you have in there, be they form Fields, Grids, DataViews or whatever.

  5. #5
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Moscow
    Posts
    137

    Default

    I need one region in BorderLayout to get status info from some page on the server. It's just pure Html. And I need to do anything to refresh data in this region from server.

    I need this : viewport making it's layout, gets page from server and shows that HTML in its south region (some sort of status window in layout), when my application makes something and the status of user data changes - i need force refresh of that HTML in the status region.

    I tried this way :

    region config :
    {
    region: 'south',
    autoLoad : {
    url: "/ui/SouthRegion.aspx"
    },
    split: true,
    height: 100,
    minSize: 100,
    maxSize: 200,
    collapsible: true,
    collapsed: true,
    title: 'Состояние',
    margins: '0 0 0 0'
    }

    then,

    updater = Ext.getCmp('main-viewport').getLayout().south.panel.getUpdater();
    updater.refresh();

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

    Default

    Why not just keep a reference to that region? Or give it an ID and getCmp it directly?

  7. #7
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Moscow
    Posts
    137

    Default

    it doesn't refresh its contents anyway... I need for now - refresh it anyway, when it will be done, i ll see how it can be optimized

Posting Permissions

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