Aug 17, 2012, 6:36 PM
FormPanel with strongly-typed aspx view
Hi,
I am trying to use a FormPanel with a strongly-type aspx view. The elements of my model are Time, Description, Action, and NotifyTime. Here is the view so far:
On postback the model is getting the time="01/01/1901" and everything else empty.
Thanks,
Eli
I am trying to use a FormPanel with a strongly-type aspx view. The elements of my model are Time, Description, Action, and NotifyTime. Here is the view so far:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<EMIAQToolkit.EventLog>" %>
<%@ Import Namespace="System.Collections.Generic"%>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title> Add event </title>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:FormPanel
ID="UserForm"
runat="server"
Frame="true"
LabelAlign="Right"
Title="Add Event -- Alert message and notify date are optional"
Width="500"
>
<Items>
<ext:DateField ID="Datefield1" runat="server"
FieldLabel="Date"
Name="Time"
AllowBlank="false"
Vtype="Date"
AnchorHorizontal="100%" AutoDataBind="true"
/>
<ext:TextField ID="TextField1" runat="server"
FieldLabel="Description"
Name="Description"
AllowBlank="false"
AnchorHorizontal="100%" AutoDataBind="true"
/>
<ext:ComboBox ID="ComboBox1" runat="server"
FieldLabel="Set Alert"
Name="Action"
TypeAhead="true"
SelectOnTab="true" AutoDataBind="true">
<Items>
<ext:ListItem Text="No Alert" />
<ext:ListItem Text="Calibrate" />
<ext:ListItem Text="Replace" />
<ext:ListItem Text="Check" />
</Items>
</ext:ComboBox>
<ext:DateField ID="Datefield2" runat="server"
FieldLabel="Notify Date"
Name="NotifyTime"
AllowBlank="true"
Vtype="Date"
AnchorHorizontal="100%" AutoDataBind="true"
/>
</Items>
<Buttons>
<ext:Button ID="Button1"
runat="server"
Text="Save"
Icon="Disk"
AutoPostBack="true"
/>
<ext:Button ID="Button2"
runat="server"
Text="Reset">
<Listeners>
<Click Handler="#{UserForm}.getForm().reset();" />
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</form>
</body>
</html>
Is there a tag that could be placed in the DateField/TextField/ComboBox elements. I already placed the AutoDataBinding tag but this isn't working.On postback the model is getting the time="01/01/1901" and everything else empty.
Thanks,
Eli