[CLOSED] [1.0] MenuItem Click DirectEvent compared with (Split)Button Click DirectEvent

  1. #1

    [CLOSED] [1.0] MenuItem Click DirectEvent compared with (Split)Button Click DirectEvent

    Hello,

    Are there any differences between the way that Click DirectEvents are handled between Buttons (Split in this case) and MenuItems on the client side?

    This is a kind of follow on from the following thread: http://forums.ext.net/showthread.php...csv-.xml-Error

    I have a the following set up:

    
    <ext:SplitButton ID="btnXLS" runat="server" Text="Excel Export" Icon="PageWhiteExcel">
                                    <Menu>
                                        <ext:Menu runat="server">
                                            <Items>
                                                <ext:MenuItem ID="mnuXML" runat="server" Text="XML Export" Icon="PageWhiteCode">
                                                    <DirectEvents>
                                                        <Click Url="/Data/Export" IsUpload="true">
                                                            <ExtraParams>
                                                                <ext:Parameter Name="data" Value="#{gpList}.getRowsValues()" Mode="Raw" Encode="true" />
                                                                <ext:Parameter Name="format" Value="xml" Mode="Value" />
                                                            </ExtraParams>
                                                        </Click>
                                                    </DirectEvents>
                                                </ext:MenuItem>
                                                <ext:MenuItem ID="mnuCSV" runat="server" Text="CSV Export" Icon="PageWhiteC">
                                                    <DirectEvents>
                                                        <Click Url="/Data/Export" IsUpload="true">
                                                            <ExtraParams>
                                                                <ext:Parameter Name="data" Value="#{gpList}.getRowsValues()" Mode="Raw" Encode="true" />
                                                                <ext:Parameter Name="format" Value="csv" Mode="Value" />
                                                            </ExtraParams>
                                                        </Click>
                                                    </DirectEvents>
                                                </ext:MenuItem>
                                            </Items>
                                        </ext:Menu>
                                    </Menu>
                                    <DirectEvents>
                                        <Click Url="/Data/Export" IsUpload="true">
                                            <ExtraParams>
                                                <ext:Parameter Name="data" Value="#{gpList}.getRowsValues()" Mode="Raw" Encode="true" />
                                                <ext:Parameter Name="format" Value="xls" Mode="Value" />
                                            </ExtraParams>
                                        </Click>
                                    </DirectEvents>
                                </ext:SplitButton>
    When I click the SplitButton everything works as expected (I get an export download). When I click the MenuItems I get an error on the client (missing parenthesis, ( etc...). If I modify my server code so that the same happens whether the MenuItem or SplitButton is clicked then I still get the error on the client so I don't think it is how the request is handled and processed.

    Secondly, if I move my MenuItem Click DirectEvent to a Button on the Toolbar next to the SplitButton then everything works fine.
    Last edited by Daniil; Oct 22, 2010 at 11:55 AM. Reason: [CLOSED]
  2. #2
    Hi,

    By default, Menu is rendered to the body (outside any form), IsUpload requireds a form, you can set FormID for MenuItem direct event (FormID can accept FormPanel id or html form id)
  3. #3
    Works a treat! Bloody forms catching me out again ;)

    Thanks

Similar Threads

  1. Replies: 5
    Last Post: Mar 19, 2014, 3:35 AM
  2. [CLOSED] Button CLICK directevent & listener timeout
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 05, 2011, 10:10 PM
  3. [CLOSED] Button's Click DirectEvent Single property needs to be reset
    By SFritsche in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 23, 2010, 1:08 PM
  4. DirectEvent Row Click
    By lukasw in forum 1.x Help
    Replies: 0
    Last Post: Apr 29, 2010, 5:02 AM
  5. [CLOSED] [1.0] MenuItem Click DirectEvent
    By methode in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Nov 18, 2009, 10:41 AM

Posting Permissions