[CLOSED] MenuItem Click does not work

  1. #1

    [CLOSED] MenuItem Click does not work

    Hi method LoadContents does not work in v2.2 but works in v1.1
    
     protected void LoadContents(object sender, DirectEventArgs e)
        {
            this.PanelContent.LoadContent(new LoadConfig(e.ExtraParams["Href"], LoadMode.IFrame));
        }

    <ext:Viewport ID="Viewport1" runat="server" Layout="border">
            <Items>
                <ext:Panel ID="PanelMenu" runat="server" Collapsible="true" Region="West" Split="true"
                    Layout="accordion" Title="" Width="175">
                    <Items>
                        <ext:MenuPanel ID="PanelHelpDesk" runat="server" Border="false" Icon="FolderGo" Title="<%$ Resources:HelpDeskWebApp,                                            PanelHomeHelpDesk %>">
                            <Menu ID="Menu2" runat="server">
                                <Items>
                                    <ext:MenuItem Text="<%$ Resources:HelpDeskWebApp, MenuItemHomeStart %>" Icon="TabGo">
                                        <DirectEvents>
                                            <Click OnEvent="LoadContents" ShowWarningOnFailure="false">
                                                <ExtraParams>
                                                    <ext:Parameter Name="Href" Value="/Settings/RedirectToDashBoard">
                                                    </ext:Parameter>
                                                </ExtraParams>
                                            </Click>
                                        </DirectEvents>
                                    </ext:MenuItem>
                                </Items>
                            </Menu>
                         </ext:MenuPanel> 
                      </Items>       
                   </ext:Panel>
               </Items>
        </ext:Viewport>
    Last edited by Daniil; Oct 08, 2013 at 8:01 AM. Reason: [CLOSED]
  2. #2
    Hi @jesperhp,

    Please use:
    <ext:Panel ID="PanelContent" runat="server">
        <Loader runat="server" AutoLoad="false" />
    </ext:Panel>
    protected void LoadContents(object sender, DirectEventArgs e)
    {
        this.PanelContent.LoadContent(new ComponentLoader()
        {
            Url = e.ExtraParams["Href"],
            Mode = LoadMode.Frame
        });
    }
  3. #3
    Its working and first time load but second time its gives error like that


    Incorrect submit config - the '__EVENTARGUMENT' parameter is absentand the detail of error



    <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br><br> <b> Exception Details: </b>System.InvalidOperationException: Incorrect submit config - the '__EVENTARGUMENT' parameter is absent<br><br> <b>Source Error:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code> </td> </tr> </table> <br> <b>Stack Trace:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code><pre>[InvalidOperationException: Incorrect submit config - the '__EVENTARGUMENT' parameter is absent] Ext.Net.ResourceManager.Page_AjaxLoadComplete(Obje ct sender, EventArgs e) +429 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.OnLoadComplete(EventArgs e) +9645782 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +867</pre></code> </td> </tr> </table> <br> <hr width=100% size=1 color=silver> <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18034 </font> </body></html><!-- [InvalidOperationException]: Incorrect submit config - the '__EVENTARGUMENT' parameter is absent at Ext.Net.ResourceManager.Page_AjaxLoadComplete(Obje ct sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Page.OnLoadComplete(EventArgs e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.Mvc.ViewPage.ProcessRequest(HttpContext context) at ASP.views_home_home_aspx.ProcessRequest(HttpContex t context) in c:\Users\Ramzan\AppData\Local\Temp\Temporary ASP.NET Files\root\79e543d2\30665a0f\App_Web_gwl3zh1s.1.cs :line 0 at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHa ndlerWrapper.<>c__DisplayClass1.<ProcessRequest>b_ _0() at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHa ndlerWrapper.<>c__DisplayClass4.<Wrap>b__3() at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHa ndlerWrapper.Wrap[TResult](Func`1 func) at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHa ndlerWrapper.Wrap(Action action) at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHa ndlerWrapper.ProcessRequest(HttpContext context) at System.Web.HttpServerUtility.ExecuteInternal(IHttp Handler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)[HttpException]: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpH andlerWrapper'. at System.Web.HttpServerUtility.ExecuteInternal(IHttp Handler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) at System.Web.HttpServerUtilityWrapper.Execute(IHttpH andler handler, TextWriter writer, Boolean preserveForm) at System.Web.Mvc.ViewPage.RenderView(ViewContext viewContext) at System.Web.Mvc.WebFormView.RenderViewPage(ViewCont ext context, ViewPage page) at System.Web.Mvc.WebFormView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) at System.Web.Mvc.BuildManagerCompiledView.Render(Vie wContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(Contro llerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActio nResult(ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.<>c__Displa yClass1a.<InvokeActionResultWithFilters>b__17() at System.Web.Mvc.ControllerActionInvoker.InvokeActio nResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__Displa yClass1a.<>c__DisplayClass1c.<InvokeActionResultWi thFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActio nResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker. <>c__DisplayClass25.<>c__DisplayClass2a.<BeginInvo keAction>b__20() at System.Web.Mvc.Async.AsyncControllerActionInvoker. <>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyn cResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsy ncResult`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker. EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<>c__DisplayClass1d.<Beg inExecuteCore>b__18(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.<>c__Displ ayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsy ncResult`1.End() at System.Web.Mvc.Controller.EndExecuteCore(IAsyncRes ult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.<>c__Displ ayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsy ncResult`1.End() at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAs yncController.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<Begi nProcessRequest>b__3(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.<>c__Displ ayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsy ncResult`1.End() at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsync Result asyncResult) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHan dler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e() at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)
    Last edited by jesperhp; Oct 08, 2013 at 11:29 AM.

Similar Threads

  1. How to find the URL on click of menuitem
    By krishna in forum 1.x Help
    Replies: 1
    Last Post: Mar 31, 2011, 6:27 AM
  2. How to find the URL on click of menuitem
    By krishna in forum 1.x Help
    Replies: 1
    Last Post: Mar 31, 2011, 5:29 AM
  3. How to get parent menuItem when click menuItem?
    By zhangsir199 in forum 1.x Help
    Replies: 2
    Last Post: Jan 21, 2011, 2:58 AM
  4. Replies: 2
    Last Post: Oct 22, 2010, 11:04 AM
  5. [CLOSED] MenuItem.ToolTip don't work.
    By pil0t in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 02, 2010, 8:39 PM

Posting Permissions