[CLOSED] Control with type 'Ext.Net.XScript' cannot be handled by layout

  1. #1

    [CLOSED] Control with type 'Ext.Net.XScript' cannot be handled by layout

    I have a UserControl containing a TaskManager and related XScript. I cannot seem to get this control to render in a Bin, HtmlBin, Items or any layout without this exception. I had no problem with this control rendering in 1.X but no idea how to solve the issue in 2.X. I consider this a bug as opposed to a enhancement request. Please ideas?
    Last edited by Daniil; Apr 30, 2013 at 4:15 AM. Reason: [CLOSED]
  2. #2
    Hi @michaeld,

    1. Bin

    We have a ticket "A possibility to put a UserControlLoader into a Bin collection".
    https://github.com/extnet/Ext.NET/issues/198

    After implementing this feature it should be possible to put such a user control into a UserControlLoader, then put it to a Bin collection.

    2. Items

    I think it is incorrect to render such a user control to an Items collection, because a TaskManager is not a component to participate in layouting.

    3. HtmlBin

    It appears to be working.

    Example Page
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <%@ Register Src="~/TestUC.ascx" TagPrefix="uc" TagName="TectUC" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Container runat="server">
                <HtmlBin>
                    <uc:TectUC runat="server" />
                </HtmlBin>
            </ext:Container>        
        </form>
    </body>
    </html>
    Example User Control
    <%@ Control Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <ext:XScript runat="server">
        <script>
            var onUpdate = function () {
                console.log(#{TaskManager1});
            };
        </script>
    </ext:XScript>
    
    <ext:TaskManager ID="TaskManager1" runat="server">
        <Tasks>
            <ext:Task AutoRun="true" Interval="2000">
                <Listeners>
                    <Update Fn="onUpdate" />
                </Listeners>
            </ext:Task>
        </Tasks>
    </ext:TaskManager>
    Last edited by Daniil; Apr 24, 2013 at 11:30 AM.
  3. #3
    Your example has it in bin.
  4. #4
    Sorry, corrected.

Similar Threads

  1. Replies: 11
    Last Post: Mar 20, 2013, 4:43 PM
  2. Replies: 4
    Last Post: Dec 02, 2012, 6:49 AM
  3. Table cannot be handled by layout
    By Bubu in forum 2.x Help
    Replies: 9
    Last Post: Nov 27, 2012, 4:33 AM
  4. Replies: 8
    Last Post: Jul 20, 2012, 1:33 PM
  5. Replies: 2
    Last Post: Jun 06, 2012, 3:38 PM

Tags for this Thread

Posting Permissions