Apr 19, 2012, 8:54 AM
[CLOSED] Error with DirectEventin LoginView
Hi,
I'm trying to call a diriect method from a ext:button within a LoginView asp.net control but I get this error:
"The control with ID 'DynamicContent_LoginView_ButtonValidateLogin' not found"
I tried to change idMode to static but what I get is the error:
"The control with ID 'ButtonValidateLogin' not found"
I am using a MasterPage (wich contains the ResourceManager)
Here is my code.
I'm trying to call a diriect method from a ext:button within a LoginView asp.net control but I get this error:
"The control with ID 'DynamicContent_LoginView_ButtonValidateLogin' not found"
I tried to change idMode to static but what I get is the error:
"The control with ID 'ButtonValidateLogin' not found"
I am using a MasterPage (wich contains the ResourceManager)
Here is my code.
<asp:Content ID="Home_Content" ContentPlaceHolderID="DynamicContent" runat="server">
<asp:LoginView ID="LoginView" runat="server">
<AnonymousTemplate>
<ext:Panel ID="PanelToAuthenticateMaster" StyleSpec="margin: 0px auto 0px auto;" runat="server" MonitorResize="true" Layout="FitLayout" Width="300" AutoHeight="true">
<Items>
<ext:FormPanel ID="PanelToAuthenticate"
runat="server"
Title="Autenticazione"
MonitorValid="true"
Padding="5"
Frame="true"
LabelWidth="80"
Height="200">
<Items>
<ext:TextField
ID="Username"
runat="server"
FieldLabel="Utente"
AllowBlank="false"
BlankText="Utente richiesto."
Text="r.foldes"
/>
<ext:TextField
ID="Password"
runat="server"
InputType="Password"
FieldLabel="Password"
AllowBlank="false"
BlankText="Password Richiesta."
Text="renobo-04">
<Listeners>
<SpecialKey Fn="TH.Default.enterKeyPressHandler" />
<KeyPress Fn="TH.Default.enterKeyPressHandler" />
</Listeners>
</ext:TextField>
<ext:HyperLink
id="ForgotPasswordHyperLink"
runat="server"
Text="Password Dimenticata?"
NavigateUrl="ForgotPassword.aspx" />
<ext:Checkbox
id="RememberMe"
runat="server"
FieldLabel="Ricordami" />
</Items>
<Buttons>
<ext:Button ID="ButtonValidateLogin" Icon="Lock" runat="server" Text="Entra">
<DirectEvents>
<Click
OnEvent="Login1_Authenticate"
Method="POST"
Failure="
#{Password}.setValue('');
Ext.Msg.show({
title: 'Errore di Autenticazione',
msg: result.errorMessage,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});
">
<EventMask ShowMask="true" MinDelay="250" />
<ExtraParams>
<ext:Parameter Name="userName" Value="#{Username}.getValue()" Mode="Raw" />
<ext:Parameter Name="password" Value="#{Password}.getValue()" Mode="Raw" />
<ext:Parameter Name="rememberMe" Value="#{RememberMe}.getValue()" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
<Listeners>
<%--<ClientValidation Handler="ButtonValidateLogin.setDisabled(!valid);" />--%>
</Listeners>
</ext:FormPanel>
</Items>
<BottomBar>
<ext:StatusBar ID="FormStatusBar" runat="server" DefaultText="Pronto">
<Items>
<ext:ToolbarFill ID="ToolbarFill1" runat="server" />
<ext:ToolbarSeparator ID="ToolbarSeparator2" runat="server" />
<ext:ToolbarTextItem ID="clock" runat="server" Text=" " CtCls="x-status-text-panel" />
</Items>
<Plugins>
<ext:ValidationStatus ID="ValidationStatus1"
runat="server"
FormPanelID="PanelToAuthenticate"
ValidIcon="Accept"
ErrorIcon="Exclamation"
ShowText="Ci sono degli errori (Clicca per i Dettagli)"
/>
</Plugins>
</ext:StatusBar>
</BottomBar>
<Listeners>
</Listeners>
</ext:Panel>
<ext:TaskManager ID="TaskManagerTime" runat="server">
<Tasks>
<ext:Task AutoRun="true" Interval="1000">
<Listeners>
<Update Handler="#{clock}.setText(new Date().format('H:mm:ss'));" />
</Listeners>
</ext:Task>
</Tasks>
</ext:TaskManager>
</AnonymousTemplate>
<LoggedInTemplate>
<%-- <uc1:Disclaimer ID="Disclaimer1" runat="server" />
<nws:ucNews ID="ucNews" runat="server" />
--%> </LoggedInTemplate>
</asp:LoginView>
<br />
<asp:LoginView ID="LoginView2" runat="server">
<RoleGroups>
<asp:RoleGroup Roles="Salesperson">
<ContentTemplate>
</ContentTemplate>
</asp:RoleGroup>
<asp:RoleGroup Roles="Customer">
<ContentTemplate>
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>
</asp:Content>
Last edited by Daniil; Apr 23, 2012 at 1:58 PM.
Reason: [CLOSED]