Jul 17, 2012, 7:51 PM
[CLOSED] When using Form Validation, I get the error below:
Following your example from online at the link below:
https://examples2.ext.net/#/Form/FormPanel/Validation/
Error: Microsoft JScript runtime error: 'this.dockedItems.get(...)' is null or not an object
https://examples2.ext.net/#/Form/FormPanel/Validation/
Error: Microsoft JScript runtime error: 'this.dockedItems.get(...)' is null or not an object
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Simple Form Panel - Ext.NET Examples</title>
<style type="text/css">
.icon-exclamation
{
padding-left: 25px !important;
background: url(/icons/exclamation-png/ext.axd) no-repeat 3px 0px !important;
}
.icon-accept
{
padding-left: 25px !important;
background: url(/icons/accept-png/ext.axd) no-repeat 3px 0px !important;
}
</style>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<br />
<ext:Button ID="Button1" ArrowAlign="Right" Text="Show Window" OnClientClick="#{WindowDetails}.show();"
runat="server" />
<ext:Window ID="WindowDetails" runat="server" Title="Details" Icon="Comment" Height="200"
Width="400" BodyStyle="background-color: #fff;" BodyPadding="5" Modal="true"
Hidden="true">
<Content>
<ext:Panel ID="Panel1" BodyBorder="0" runat="server" Layout="FitLayout">
<Items>
<ext:FormPanel ID="FormPanel1" runat="server" BodyPadding="0" Border="false" Layout="AnchorLayout">
<Content>
<ext:ComboBox ID="Type" runat="server" EmptyText="Select a Type" Width="250" AllowBlank="false"
FieldLabel="Type">
<Store>
<ext:Store ID="TypeStore" runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="TypeId" Type="Int" />
<ext:ModelField Name="Description" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>
<ext:TextArea ID="Comments" runat="server" Width="350" FieldLabel="Comments" EmptyText="Please enter comments" />
</Content>
<BottomBar>
<ext:StatusBar runat="server" />
</BottomBar>
<Listeners>
<ValidityChange Handler="this.dockedItems.get(1).setStatus({
text : valid ? 'Form is valid' : 'Form is invalid',
iconCls: valid ? 'icon-accept' : 'icon-exclamation'
});
#{btnUpdate}.setDisabled(!valid);" />
</Listeners>
</ext:FormPanel>
</Items>
<Buttons>
<ext:Button ID="btnUpdate" ArrowAlign="Right" Icon="Accept" Text="Update" Disabled="true"
FormBind="true" runat="server" />
</Buttons>
</ext:Panel>
</Content>
</ext:Window>
</body>
</html>
Last edited by Daniil; Jul 23, 2012 at 4:44 PM.
Reason: [CLOSED]