Difference between revisions of "Active List Client"
| Line 62: | Line 62: | ||
[[Category:Active List|Active List Client]] | [[Category:Active List|Active List Client]] | ||
[[Category:Client|Active List Client]] | [[Category:Client|Active List Client]] | ||
| + | [[Category:Mobile|Active List Client]] | ||
[[Category:Version 5.1|Active List Client]] | [[Category:Version 5.1|Active List Client]] | ||
[[Category:WinX|Active List Client]] | [[Category:WinX|Active List Client]] | ||
| − | |||
| − | |||
Revision as of 08:28, 20 April 2026
Introduction
If an Active List is defined on a Content Object that is associated with an integer MetaProperty, the property is displayed like a usual SelectiveList. An ActiveList (i.e., if it has been configured on the server for a content object) always takes precedence over a MetaProperty SelectiveList. For editing, it behaves exactly the same as with a standard SelectiveList.
When the user opens an ActiveList:
- All available options from the ActiveList are displayed as text labels.
- The label for each option is shown in the language configured on the web service. If a translation for the configured language is unavailable, the label is displayed in the default language.
- Each option in the ActiveList has an associated unique integer value that is set to the MetaProperty when selected.
- Only one option can be selected at a time. Selecting an option updates the MetaProperty value immediately.
Sorting of items in the dropdown:
- If all options in the ActiveList have unique sort order values, they are displayed in ascending order of these sort order values.
- If sort orders are not unique, options with the same sort order are sorted in ascending order by their label.
XAML
A new SelectiveItems property was added to the PropertyViewModel to enable access to an ActiveList from XAML. No DataTriggers or additional checks are required, as the correct list selection is handled automatically.
MAUI
<controls:SfListViewExt
x:Name="SelectiveList"
BindingContext="{TemplateBinding BindingContext}"
ItemSize="40"
ItemTemplate="{StaticResource PopupSelectiveListItemTemplate}"
ItemsSource="{Binding SelectiveItems}"
SelectedItem="{Binding ValueItem.PropertyValue, Mode=OneWay, Converter={StaticResource PropertyValueToSelectiveItem}, ConverterParameter={Binding Source={x:Reference SelectiveList}, Path=ItemsSource}}"
SelectionBackground="{DynamicResource UBIKAccentColor}"
SelectionMode="Single"
Style="{DynamicResource UBIKListView}" />
x:Name="SelectiveList"
BindingContext="{TemplateBinding BindingContext}"
ItemSize="40"
ItemTemplate="{StaticResource PopupSelectiveListItemTemplate}"
ItemsSource="{Binding SelectiveItems}"
SelectedItem="{Binding ValueItem.PropertyValue, Mode=OneWay, Converter={StaticResource PropertyValueToSelectiveItem}, ConverterParameter={Binding Source={x:Reference SelectiveList}, Path=ItemsSource}}"
SelectionBackground="{DynamicResource UBIKAccentColor}"
SelectionMode="Single"
Style="{DynamicResource UBIKListView}" />
UWP
<controls:ComboBoxExt
x:Name="ComboBox"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
DisplayMemberPath="DisplayText"
ItemsSource="{Binding PropertyViewModel.SelectiveItems}"
PlaceholderText="{Binding PropertyEdit_PickerPlaceholder, Source={StaticResource AppResources}}"
SelectedValue="{Binding PropertyValue, Mode=TwoWay}"
SelectedValuePath="Value"
Visibility="{Binding PropertyViewModel.ShowComboBox, Converter={StaticResource BoolToVisConverter}}" />
x:Name="ComboBox"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
DisplayMemberPath="DisplayText"
ItemsSource="{Binding PropertyViewModel.SelectiveItems}"
PlaceholderText="{Binding PropertyEdit_PickerPlaceholder, Source={StaticResource AppResources}}"
SelectedValue="{Binding PropertyValue, Mode=TwoWay}"
SelectedValuePath="Value"
Visibility="{Binding PropertyViewModel.ShowComboBox, Converter={StaticResource BoolToVisConverter}}" />
