[CLOSED] Window UI config set from javascript Ext.Net 4.3.0

  1. #1

    [CLOSED] Window UI config set from javascript Ext.Net 4.3.0

    Hello,

    I have a page that contains only a button and this button will create an EXT window from javascript with a UI value 'primary'.
    It was working fine on 4.2.2, but when upgrading to 4.3.0 the window can't take the UI. please check the attached screenshot.

    Here is a sample code. (.net framework 4.6)Click image for larger version. 

Name:	windowUI.PNG 
Views:	32 
Size:	5.9 KB 
ID:	25033

    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    
    
       <script type="text/javascript">
    
    
           function createWindow()
           {
               var win1 = new Ext.Window({
                   id: 'Window1',
                   title: 'Window1',
                   closeAction: 'destroy',
                   width: 750,
                   height: 500,
                   ui: "danger",
               });
               win1.show();
           }
    
    
       </script>
    
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server" ID="ResourceManager1"  />
            <ext:Button runat="server" Text="Create Window" OnClientClick="createWindow()" />
    
        </form>
    </body>
    </html>
    
    Last edited by fabricio.murta; Oct 20, 2017 at 6:30 PM. Reason: no feedback from the user in 7+ days
  2. #2
    Hello @Geovision!

    I don't think your example works on Ext.NET 4.2.2, there's something missing on your test case that is actual for a long long time.

    If you don't make any component on markup/razor/page load using UI, the client-side resources don't get loaded at all, so if you want to use the first UI-related resource on pages based on client-side, you have to explicitly tell Ext.NET's resource manager to load the resources using ResourceManagerm.RegisterUI(). Please refer to this Ext.NET Example: Miscellaneous > UI > Window

    This is not a change introduced in Ext.NET 4.3.0, so maybe you found something else while upgrading, and while making the test case ended up with this?
  3. #3
    Hello @Geovision!

    It's been a while since we last posted here and still no feedback from you. Did the answer above meet your expectations, or do you still need help on this issue?
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 6
    Last Post: Feb 15, 2012, 4:15 PM
  2. Replies: 2
    Last Post: Dec 15, 2011, 11:58 AM
  3. How i can add listeners to window by javascript
    By vucuongkg in forum 1.x Help
    Replies: 2
    Last Post: Apr 01, 2010, 12:16 AM
  4. Replies: 4
    Last Post: Oct 27, 2009, 6:15 AM
  5. Add JavaScript to Window on create?
    By ajaxus in forum 1.x Help
    Replies: 3
    Last Post: Feb 26, 2009, 11:25 AM

Posting Permissions