Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

Closed Issue: Errors when validation on TabPanels based form. [1618]

$
0
0
I customised a data type form so that the widgets spanned over many tabpanels. The tabs have required data. When I click save then an error icon containing a hand is shown on the tab panel with the required data missing. However, when I go to edit the tab panel with the issue, the error hand icon remains and I the save button is still disabled.

In the example form below, country is a required field.

```
<cms:formdefinition xmlns:cms="http://www.composite.net/ns/management/bindingforms/1.0" xmlns="http://www.composite.net/ns/management/bindingforms/std.ui.controls.lib/1.0" xmlns:ff="http://www.composite.net/ns/management/bindingforms/std.function.lib/1.0" xmlns:f="http://www.composite.net/ns/function/1.0">
<cms:bindings>
<cms:binding name="Id" type="System.Guid" optional="true" />
<cms:binding name="FirstName" type="System.String" optional="true" />
<cms:binding name="PhoneNumber" type="System.String" optional="true" />
<cms:binding name="BirthDate" type="System.DateTime" optional="true" />
<cms:binding name="HomeAddress" type="System.String" optional="true" />
<cms:binding name="Company" type="System.Guid" optional="true" />
<cms:binding name="FavouritePage" type="System.Nullable`1[System.Guid]" optional="true" />
<cms:binding name="Country" type="System.String" optional="true" />
<cms:binding name="FavouriteFood" type="System.Nullable`1[System.Guid]" optional="true" />
</cms:bindings>
<cms:layout>
<cms:layout.label>
<cms:read source="FirstName" />
</cms:layout.label>
<TabPanels>
<PlaceHolder Label="Personal Details">
<FieldGroup>
<TextBox Label="First Name" Help="The user's first name" SpellCheck="true">
<TextBox.Text>
<cms:bind source="FirstName" />
</TextBox.Text>
</TextBox>
<TextBox Label="Phone Number" Help="The user's phone number" SpellCheck="true">
<TextBox.Text>
<cms:bind source="PhoneNumber" />
</TextBox.Text>
</TextBox>
<DateSelector Label="Birth Date" Help="The user's birth date">
<DateSelector.Date>
<cms:bind source="BirthDate" />
</DateSelector.Date>
</DateSelector>
<TextArea Label="Home Address" Help="The user's home address" SpellCheck="false">
<TextArea.Text>
<cms:bind source="HomeAddress" />
</TextArea.Text>
</TextArea>
</FieldGroup>
</PlaceHolder>
<PlaceHolder Label="Additional Info">
<FieldGroup>
<KeySelector Label="Company" Help="The user's company" OptionsKeyField="Key" OptionsLabelField="Label" Required="true">
<KeySelector.Selected>
<cms:bind source="Company" />
</KeySelector.Selected>
<KeySelector.Options>
<ff:StaticMethodCall Type="&lt;t n=&quot;Composite.Plugins.Functions.WidgetFunctionProviders.StandardWidgetFunctionProvider.DataReference.DataReferenceSelectorWidgetFunction`1, Composite, Version=3.2.4681.14221, Culture=neutral, PublicKeyToken=null&quot;&gt;&#xD;&#xA; &lt;t n=&quot;Test.Company&quot; /&gt;&#xD;&#xA;&lt;/t&gt;" Method="GetOptions" Parameters="Test.Company" />
</KeySelector.Options>
</KeySelector>
<DataReferenceTreeSelector Label="Favourite Page" Help="The user's favourite page" Handle="Composite.Management.PageIdSelectorDialog" DataType="Composite.Data.Types.IPage,Composite" NullValueAllowed="true">
<DataReferenceTreeSelector.Selected>
<cms:bind source="FavouritePage" />
</DataReferenceTreeSelector.Selected>
</DataReferenceTreeSelector>
<KeySelector Label="Country" Help="The user's country" OptionsKeyField="Key" OptionsLabelField="Label" Required="true">
<KeySelector.Selected>
<cms:bind source="Country" />
</KeySelector.Selected>
<KeySelector.Options>
<ff:StaticMethodCall Type="Composite.Plugins.Functions.WidgetFunctionProviders.StandardWidgetFunctionProvider.String.SelectorWidgetFunction,Composite" Method="GetOptions" Parameters="&lt;SelectorOptionsSource KeyFieldName=&quot;&quot; LabelFieldName=&quot;&quot;&gt;&#xD;&#xA; &lt;TreeNode&gt;&#xD;&#xA; &lt;f:param xmlns:f=&quot;http://www.composite.net/ns/function/1.0&quot; name=&quot;Options&quot;&gt;&#xD;&#xA; &lt;f:function xmlns:f=&quot;http://www.composite.net/ns/function/1.0&quot; name=&quot;Composite.Utils.String.Split&quot;&gt;&#xD;&#xA; &lt;f:param name=&quot;String&quot; value=&quot;Canada,Columbia,India,South Africa,United Kingdom,United States of America&quot; /&gt;&#xD;&#xA; &lt;/f:function&gt;&#xD;&#xA; &lt;/f:param&gt;&#xD;&#xA; &lt;/TreeNode&gt;&#xD;&#xA;&lt;/SelectorOptionsSource&gt;" />
</KeySelector.Options>
</KeySelector>
<KeySelector Label="Favourite Food" Help="The user's favourite food" OptionsKeyField="Key" OptionsLabelField="Label" Required="false">
<KeySelector.Selected>
<cms:bind source="FavouriteFood" />
</KeySelector.Selected>
<KeySelector.Options>
<ff:StaticMethodCall Type="&lt;t n=&quot;Composite.Plugins.Functions.WidgetFunctionProviders.StandardWidgetFunctionProvider.DataReference.NullableDataReferenceSelectorWidgetFunction`1, Composite, Version=3.2.4681.14221, Culture=neutral, PublicKeyToken=null&quot;&gt;&#xD;&#xA; &lt;t n=&quot;Test.Food&quot; /&gt;&#xD;&#xA;&lt;/t&gt;" Method="GetOptions" Parameters="Test.Food" />
</KeySelector.Options>
</KeySelector>
</FieldGroup>
</PlaceHolder>
</TabPanels>
</cms:layout>
</cms:formdefinition>
```
Comments: Closed as not reproducible.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>