Oct 22, 2010, 10:13 AM
[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:
Secondly, if I move my MenuItem Click DirectEvent to a Button on the Toolbar next to the SplitButton then everything works fine.
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]