[CLOSED] EXT.NET 7.0 Core - Direct Method Handler/Call Issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] EXT.NET 7.0 Core - Direct Method Handler/Call Issue

    Dear,

    Please note that I encountered an issue when clicking a <ext-button> (MVC) having a direct method as a listeners.
    Noting that I tried the same instructions listed in the following page URL:
    https://examples.ext.net/#/window/basic/hello_world

    Problem description:
    when clicking on the button, it alerts the following:
    Request Failure (Attached).
      Console Error:  
      ShowWindowDirect:1 Failed to load resource: the server responded with a status of 404 ()
    Click image for larger version. 

Name:	Error1.jpg 
Views:	99 
Size:	51.6 KB 
ID:	25458

     //TestDirect.cshtml
    
    @page
    @model FFMSAdminTool.Views.Home.TestDirectModel
    @{
        Layout = null;
    }
    <!DOCTYPE html>
    <html>
    <head>
        <title>
            Hello World - Ext.NET Examples
        </title>
        
    </head>
    <body>
        <h1>Hello World</h1>
    
        <p>
            The following sample demonstrates how to configure a new Window and <code>show</code> the Window if closed.
        </p>
    
        <ext-button text="Show Window (Client Event)" onClientClick="App.Window1.show();" />
    
        <br />
    
        <ext-button text="Show Window (Direct Event)" onDirectClick="ShowWindowDirect" />
    
        <ext-window id="Window1"
                    title="Hello World"
                    height="270"
                    width="360"
                    bodyPadding="18"
                    modal="true">
            <content>
                This is my first
                <a target="_blank" href="https://ext.net/">Ext.NET</a> Window.
            </content>
        </ext-window>
    </body>
    </html>
    //TestDirect.cshtml.cs
    
    using Ext.Net;
    using Ext.Net.Core;
    using Microsoft.AspNetCore.Mvc.RazorPages;
    using Microsoft.AspNetCore.Mvc;
    
    namespace FFMSAdminTool.Views.Home
    {
        public class TestDirectModel : PageModel
        {
            public void OnGet()
            {
            }
    
            public IActionResult OnPostShowWindowDirect()
            {
                this.GetCmp<Window>("Window1").Show();
    
                return this.Direct();
            }
        }
    }
    Thank you
    Last edited by fabricio.murta; Nov 05, 2020 at 12:18 PM.

Similar Threads

  1. Hide Mask during Direct Method Call
    By dkhandelwal in forum 2.x Help
    Replies: 1
    Last Post: May 04, 2016, 2:36 PM
  2. Replies: 0
    Last Post: May 28, 2013, 2:51 PM
  3. [CLOSED] Output Cache issue with Direct Method / Direct Event
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 18
    Last Post: Mar 01, 2013, 5:03 AM
  4. [CLOSED] how to call direct method
    By tactime10 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 04, 2012, 8:38 AM
  5. how to call direct method in asp.net mvc3
    By waqasde in forum 2.x Help
    Replies: 1
    Last Post: Mar 16, 2012, 9:26 AM

Posting Permissions