Jan 11, 2010, 1:53 PM
[CLOSED] UserControl MultiField Allow Blank
I have a usercontrol with a multifield:
<ext:MultiField ID="CopyToFields" runat="server" FieldLabel="Field Label set in code">
<Fields>
<ext:TextField ID="txtRecievedBy" EmptyText="Recieved By (name)" Width="320" AllowBlank="false"
runat="server">
</ext:TextField>
<ext:DateField ID="dteCopyDate" runat="server" AllowBlank="false" EmptyText="Select Date.">
</ext:DateField>
<ext:TimeField ID="tmeCopyTime" runat="server" Increment="1" Format="H:mm" Width="60"
AllowBlank="false">
</ext:TimeField>
</Fields>
</ext:MultiField>
I put this control in a formlayout and then in a formpanel: <ext:FormPanel ID="pnlRight" runat="server" Border="true" Header="false" MonitorPoll="50"
MonitorValid="true" StyleSpec="padding:2px">
<Body>
<ext:FormLayout ID="FormLayout2" runat="server" LabelAlign="Left" LabelWidth="100">
<ext:Anchor>
<ext:Panel ID="Panel3" Border="false" runat="server">
<Body>
<CTO:CopyTo runat="server" ID="CopyToMedicalPractitioner" />
</Body>
</ext:Panel>
</ext:Anchor>
</ext:FormLayout>
</Body>
</ext:FormPanel>
But when I come to check if the #{pnlRight}.getForm().isValid() I always get true even if these fields are left blank. If I remove the usercontrol and put this multifield directly into the page the #{pnlRight}.getForm().isValid() function works correctly. Have a missed something?