PDA

View Full Version : [CLOSED] The control with ID 'aaaaa' not found - ResourceManager.FindControlByConfigID returns NULL



inteligencija
Aug 22, 2012, 11:10 AM
Hi

I have problem with ResourcesManager.cs


ResourceManager.FindControlByConfigID(this.Page, controlID, true, null);

returns NULL in


public void RaisePostBackEvent

Here is simplified example :

Default.aspx


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="MDM._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<%@ Register Src="modules/FMM.ascx" TagPrefix="mod" TagName="FMM" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>MDM Home</title>
</head>
<body>
<form id="formDesktop" runat="server" >
<mod:FMM ID="FMMmod" runat="server" />
<div>
<ext:ResourceManager ID="rmDefault" runat="server" Locale="pt-EN" Theme="Default" ViewStateMode="Enabled"/>
<ext:Desktop ID="Desktop1" runat="server" >
<Modules></Modules>
<StartMenu ID="StartMenu" Title="Start Menu" Icon="StarSilver" Height="370" Weight="310" >
<MenuItems>

</MenuItems>
<ToolConfig>

</ToolConfig>
</StartMenu>
</ext:Desktop>
</div>
</form>
</body>
</html>

FMM.ascx

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="FMM.ascx.vb" Inherits="MDM.FMM" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>


<ext:DesktopModuleProxy ID="DesktopModuleProxy1" runat="server" >
<Module ModuleID="FMMmod" AutoRun="false" >
<Launcher Text="FMM" Icon="Money" />
<Window>
<ext:Window id="winFMMmain" runat="server" Width="1120" Height="575" Layout="FormLayout" Title="FMM" >
<Items>
<ext:Button runat="server" ID="aaaaa" Text="aaaaa" Icon="Accept" Width="10">
<DirectEvents>
<Click OnEvent="aaaaa_Click" ></Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:Window>
</Window>
</Module>
</ext:DesktopModuleProxy>

FMM.ascx.vb

Public Class FMM
Inherits System.Web.UI.UserControl

Protected Sub aaaaa_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles aaaaa.Click
winFMMmain.Close()
End Sub
End Class

I am using
Official Ext.NET v2.0.0 release
Hope you can help me .

Thanks

Daniil
Aug 22, 2012, 11:25 AM
Hi,

Thanks for the report. I am not sure this scenario is possible, but we will investigate.

Anyways, you can always use a DirectMethod instead of a DirectEvent.

inteligencija
Aug 22, 2012, 3:07 PM
Hi,
Anyways, you can always use a DirectMethod instead of a DirectEvent.

I was not able to implement DirectMethod neither


<ext:Button runat="server" ID="aaaaa" Text="aaaaa" Icon="Accept" Width="10">
<Listeners>
<Click Handler="App.direct.aa();" />
</Listeners>
</ext:Button>




<DirectMethod()>
Protected Sub aa()
winFMMmain.Close()
End Sub

Daniil
Aug 22, 2012, 3:09 PM
Any DirectMethod should be Public, not Protected.

Hope this helps.

inteligencija
Aug 22, 2012, 3:11 PM
Still not working :(

Vladimir
Aug 22, 2012, 5:46 PM
Please investigate the following sample demonstrates how to call user contgrol's direct method
http://examples2.ext.net/#/Events/DirectMethods/UserControls/
http://examples2.ext.net/#/Events/DirectMethods/ID_Mode/

Vladimir
Aug 22, 2012, 8:08 PM
The issue is fixed in SVN
Now DirectEvent is executed without any exceptions

inteligencija
Aug 23, 2012, 7:55 AM
The issue is fixed in SVN
Now DirectEvent is executed without any exceptions


it works now


Thanks