[CLOSED] Raising Accordion´s BeforeExpand event wrongly

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I folks, i have a accordion with two sub-panels. When the first one is collapsed and then the second one is expanded the BeforeExpand of the first panel is raised.

    To reproduce the problem, please do the following steps:
    • Collapsed the first panel
    • Collapsed the second panel


    i think the reason is because the beforeexpand expand was overriden. I did it because i need to collapse all the children of an accordion, as shown in the following thread.
    http://forums.ext.net/showthread.php...rdion-children

    <script type="text/javascript">
        var onAfterRender = function (ct) {
            ct.items.each(function (item) {
                item.on("beforeexpand", function () {
                    return !this.layout.processing;
                },
            ct);
            });
        };
    </script>
    <ext:Panel ID="Window1" runat="server" Title="Accordion" Width="250" Height="400"
        Maximizable="true" BodyBorder="0" Icon="ApplicationTileVertical" Layout="Accordion">
        <LayoutConfig>
            <ext:AccordionLayoutConfig Multi="true" />
        </LayoutConfig>
        <Items>
            <ext:Panel ID="Panel1" runat="server" Title="Settings">
                <Listeners>
                    <BeforeExpand Handler="alert('panel 1');" />
                </Listeners>
            </ext:Panel>
            <ext:Panel ID="Panel2" runat="server" Title="Even More Stuff">
                <Listeners>
                    <BeforeExpand Handler="alert('panel 2');" />
                </Listeners>
            </ext:Panel>
        </Items>
        <Listeners>
            <AfterRender Fn="onAfterRender" />
        </Listeners>
    </ext:Panel>
    Last edited by Daniil; Jun 25, 2012 at 12:18 PM. Reason: [CLOSED]

Similar Threads

  1. Replies: 8
    Last Post: Jun 20, 2012, 6:48 PM
  2. Replies: 5
    Last Post: Nov 11, 2010, 7:33 PM
  3. [CLOSED] Accordion + GridPanel
    By Zarzand in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Apr 02, 2009, 8:15 PM
  4. [CLOSED] Accordion KeepActive
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 23, 2009, 8:15 AM
  5. [CLOSED] Accordion Question
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 16, 2009, 10:39 PM

Tags for this Thread

Posting Permissions