[CLOSED] Cannot get to work Loader in VB

  1. #1

    [CLOSED] Cannot get to work Loader in VB

    Hi all,

    I'm trying to use one of the methods used here: https://examples2.ext.net/#/Loaders/...Direct_Method/, but I cannot make it work in VB.

    Here is a test case:

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestLoader.aspx.vb" Inherits="EventFactoryWebAzure.TestLoader" %>
    
    <script runat="server">
    
        <DirectMethod>
        Public Shared Function CargaControl() As String
    
            Return ComponentLoader.ToConfig("~/Controles/GestionClientes.ascx")
    
        End Function
    
    </script>
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
    </head>
    <body>
        <form id="frm" runat="server" style="height: 100%;">
        
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" DisableViewState="true">
        </ext:ResourceManager>  
        
        <ext:Viewport ID="Viewport1" runat="server" StyleSpec="background-color: transparent;" Layout="BorderLayout">
            <Items>
                <ext:TabPanel 
                    ID="TabPanel1"
                    Region="Center"
                    runat="server" 
                    ActiveTabIndex="0" 
                    Border="false" 
                    BodyStyle="background-color: #4D778B; border: 1px solid #AABBCC; border-top: none;"
                    MarginsSummary="5 5 5 0">
                    <Plugins>
                        <ext:BoxReorderer ID="BoxReorderer1" runat="server" />
                    </Plugins>
                    <Items>
                        <ext:Panel 
                            ID="pnlClientes" 
                            runat="server" 
                            Title="Clientes" 
                            Icon="Group" 
                            BodyStyle="background-color: transparent;"
                            AutoScroll="true"
                            Layout="FormLayout">
                            <Loader 
                                runat="server" 
                                AutoLoad="false"
                                DirectMethod="#{DirectMethods}.CargaControl()" 
                                Mode="Component">
                                <LoadMask ShowMask="true" Msg="Cargando..." />
                            </Loader>
                            <Buttons>
                                <ext:Button runat="server" Text="Load" Icon="PluginGo">
                                    <Listeners>
                                        <Click Handler="this.up('panel').load();this.disable();" />
                                    </Listeners>
                                </ext:Button>
                            </Buttons>                        
                        </ext:Panel>
                    </Items>
                </ext:TabPanel>
            </Items>
        </ext:Viewport>
    
        </form>
    </body>
    </html>
    If you debig it, CargaControl() is never called. How should I call the DirectMethod?

    Thank you in advance.
    Last edited by Daniil; Jan 21, 2014 at 4:45 AM. Reason: [CLOSED]
  2. #2
    Hi @jamesand,

    Please replace
    DirectMethod="#{DirectMethods}.CargaControl()"
    with
    DirectMethod="#{DirectMethods}.CargaControl"
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @jamesand,

    Please replace
    DirectMethod="#{DirectMethods}.CargaControl()"
    with
    DirectMethod="#{DirectMethods}.CargaControl"
    It is curious, it works in the test case but not in my web site. We will investigate.

Similar Threads

  1. [CLOSED] Loader with DirectEvents
    By aisi_it_admin in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 04, 2013, 1:55 PM
  2. [CLOSED] reference of a control loaded by component loader
    By mirwais in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 28, 2012, 1:05 PM
  3. [CLOSED] Component Loader
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 13
    Last Post: Nov 13, 2012, 3:08 PM
  4. Replies: 5
    Last Post: May 13, 2009, 12:10 PM
  5. Replies: 2
    Last Post: Mar 16, 2009, 1:50 PM

Tags for this Thread

Posting Permissions