Jump to: navigation, search

Difference between revisions of "Dynamic Selective List (Client)"


Line 1: Line 1:
{{UBIK}} supports defining a list of values for users to choose from instead of letting them enter arbitrary values. These are what we call selective list and selective list items.
+
In property editing, {{UBIK}} supports defining a list of values for users to choose from instead of letting them enter arbitrary values. These are what we call selective list and selective list items.
  
 
== Static & dynamic versions ==
 
== Static & dynamic versions ==

Revision as of 10:36, 23 November 2021

In property editing, UBIK® supports defining a list of values for users to choose from instead of letting them enter arbitrary values. These are what we call selective list and selective list items.

Static & dynamic versions

Previously, such a list and list items are static and parts of a MetaProperty, which means it's difficult or even impossible to update once they are configured and delivered to the clients in productive environments.

In some scenarios where such lists or list items are known to change quite often, a more dynamic version is needed.

Technical concept

The items of a dynamic selective list are instances of ContentClass, also known as UBIK® objects. So selecting a dynamic selective list item is just like selecting a query result item during editing a Guid/link property. In fact, properties having dynamic selective lists are Guid properties and the feature shares the same technology as the general Guid property editing. In other words:

  • The items are found through a filter query (specifically a DSL_QUERY);
  • The display strings of the selected item are presented as the display value of the property;
  • The UID of the object/item is the actual value of the property;
  • Through this Guid link, it's possible to get all property values on the selected item.

Dynamic items

The crucial part of this new solution is that it's dynamic, meaning the items to choose from can vary upon data changes of the following.

Data hierarchy

To resolve the suitable dynamic selective list items, UBIK® first looks for so-called dependency objects, namely objects that the property being edited depends on. This is done through checking the data hierarchy upward, starting from the object being edited, with the following rules:

  • The process is recursive. UBIK® looks up the hierarchy until it either reaches the top/root or finds an object with the dependency property.
  • An object can have multiple parent objects. All those parents are taken into account in the item resolving process. Finding one dependency object along a parent lineage doesn't stop UBIK® from checking the other lineages and this is why it's possible to have multiple dependency objects.
  • It's also possible that the dependency object is the one being edited itself.

Dependency property values

Dependency property values are those values that directly determine which dynamic selective list items are available. Once UBIK® finds the dependency objects in the data hierarchy, it tries to extract values from the specified properties (dependency property name) on those objects.

The values are then used as inputs for the filter query (configured on the property being edited) according to the dynamic selective list criteria. From there on, the item resolving process becomes identical to offline querying.

Dynamic selective list criteria

UBIK® relies on special objects with the DSL_Criterion_CLS to resolve items dynamically. These objects carry the following properties and each of them serves a different purpose of configurability.

  • DYNAMIC_SELECTIVE_LIST: The Guid of the DSL_QUERY instance that should be used in resolving dynamic selective list items.
  • DEPENDENCY_CLASS: (Optional) The Guid of the MetaClass which instructs UBIK® the type of objects to exclusively look for when searching for dependency objects in the data hierarchy. If unspecified, any object having the specified dependency property can be a dependency object.
  • DEPENDENCY_PROPERTY_NAME: The name of the property whose values determine the dynamic selective list items.
  • QUERY_CRITERION_NAME: The name of the property that the resolved dependency property values should be filled into for querying.
  • IS_MULTI_VALUE_STRING: (Optional) Whether the value of the dependency property should be interpreted as multiple string values separated by ";" Defaults to false.
  • IGNORE_NULL: (Optional) Whether null dependency property values should serve as a filtering criterion or be ignored. Defaults to false.

See also