Nov 03, 2020, 2:15 PM
[CLOSED] EXT.NET 7.0 Core - Direct Method Handler/Call Issue
Dear,
Please note that I encountered an issue when clicking a
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:
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 ()
//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.