[CLOSED] How to reset panel when autoloading a partialview

  1. #1

    [CLOSED] How to reset panel when autoloading a partialview

      <ext:Window ID="AccountWindow" runat="server" IDMode="Static" Title="Account Details"
            Hidden="true" Modal="true" AutoHeight="true" Width="410px">
            <Items>
                <ext:Panel ID="AccountPanel" runat="server" IDMode="Static" Border="false" Padding="10">
                    <AutoLoad Url="~/Account" TriggerEvent="show" NoCache="true" ReloadOnEvent="true"  Mode="Merge">
                        <Params>
                            <ext:Parameter Name="containerId" Value="AccountPanel" Mode="Value" />
                        </Params>
                    </AutoLoad>
                   
                </ext:Panel>
            </Items>
            <Listeners>
                <Show Handler="AccountPanel.show()" />
            </Listeners>
        </ext:Window>
    The above is my window with a panel that autoloads a partial view on a show trigger bubble down event chain. I would like to keep the data fresh, meaning that I want to destroy the contents of what was merged but be able to reload the partial view into the AccountPanel again.

    As it stands, when ReloadOnEvent=true, the panel is not cleared out and the same contents get merged into the AccountPanel again, which causes duplicate components to display.

    How do I resolve this?
    Last edited by Daniil; May 09, 2012 at 4:42 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I can suggest the following solution.

    1. Remove
    TriggerEvent="show"
    ReloadOnEvent="true"
    2. Replace
    <Show Handler="AccountPanel.show()" />
    with

    <Show Handler="AccountPanel.removeAll(); AccountPanel.reload();" />
  3. #3
    Thanks for taking the time, Daniil. I took another look at what I was "really" doing and it just made more sense to make this a user control and show hide the window with the store reloading on show.
  4. #4
    Yes, if it's an option to reload the Store only - it's the best choice in the performance aspect.

Similar Threads

  1. [CLOSED] PartialView in MVC4
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 27, 2012, 9:37 AM
  2. Replies: 0
    Last Post: Jul 01, 2011, 2:49 PM
  3. [CLOSED] Autoloading content in a static position
    By craig2005 in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Mar 18, 2011, 1:03 PM
  4. [CLOSED] PartialView to replace the contents of a div.
    By mattwoberts in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 22, 2011, 3:33 PM
  5. [CLOSED] Callback from a PartialView
    By Stefanaccio in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 11, 2010, 11:39 AM

Tags for this Thread

Posting Permissions