You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comment #0 on 2020-09-07T15:58:20.000Z:
For example, use a tree item mapping to display a list of objects in a tree.
You want to display these objects, sorting them by their name.
So, you use the Sirius service: sortedBy(o | o.name) on this list.
Elsewhere, you can use a reference widget in order to create a new object and to reference it in this list. Note this action may create an empty object. So, if this one contains the feature name, name will be null.
In runtime, if you creates a new object (by this widget i.e.) in a list sorted with this service, this will involve an issue to display the list of items.
Indeed, all the items will not display anymore (as long as one of the objects (at least), from the list, owns a name null).
A workaround consists in using:
Either his own Java service to sort (and to manage the null case)
Or, his own service to get the name as an empty string (or default string) instead of null
Unzip the file in your workspace (my.project2.design)
Launch a runtime
Use a basicfamily model
Select the viewpoint "MyViewpoint"
Select the Family object (root object)
In the properties view, select the page named "sortedBy(p | p.name) with a name null".
You see a group with a reference widget which displays the list of the persons in the selected family and a list widget which displays these ones sorted by their name.
Right click on the Family object, in the model explorer view > New Representation > new family. You get a tree representation with the list of the persons in the family, sorted by their name.
Select again the Family in the model explorer view and come back on our page in the properties view.
Click on the button "+" and Finish (creation of a Man).
You see a Man without name, added in the reference widget (OK)
The list widget has not changed at all (NOK)
The tree representation is empty (all the persons have disappeared) (NOK)
The text was updated successfully, but these errors were encountered:
Comment #0 on 2020-09-07T15:58:20.000Z:
For example, use a tree item mapping to display a list of objects in a tree.
You want to display these objects, sorting them by their name.
So, you use the Sirius service: sortedBy(o | o.name) on this list.
Elsewhere, you can use a reference widget in order to create a new object and to reference it in this list. Note this action may create an empty object. So, if this one contains the feature name, name will be null.
In runtime, if you creates a new object (by this widget i.e.) in a list sorted with this service, this will involve an issue to display the list of items.
Indeed, all the items will not display anymore (as long as one of the objects (at least), from the list, owns a name null).
A workaround consists in using:
Comment #1 on 2020-09-07T16:52:49.000Z:
The text was updated successfully, but these errors were encountered: