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
{{ message }}
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ As a prelude to your treeview setup, you need to mention all the entity types yo
35
35
36
36
The treeview always require a context object (thus; the widget can only be used inside a dataview or templategrid). and can only display objects which are somehow related to your context. If you are in the rare case that you have no such context, see the demo project about how to create a dummy context. The context object should always be part of your entity configuration! Otherwise the treeview won't load at all.
37
37
38
-
For each type, you can define a view properties; sorting, cacheburst (see the refreshing the tree section) and custom styling for this object type. We recommend to use classes and define them in your custom theme, as they provide a lot of flexibility and possibilities, but for a quick prototype inline styling might work as well. If you use drag and drop, the sort attribute should be an ascending float attribute. See the drag and drop section for more information.
38
+
For each type, you can define a view properties; sorting, cache bust (see the refreshing the tree section) and custom styling for this object type. We recommend to use classes and define them in your custom theme, as they provide a lot of flexibility and possibilities, but for a quick prototype inline styling might work as well. If you use drag and drop, the sort attribute should be an ascending float attribute. See the drag and drop section for more information.
39
39
40
40
When you configured all entities you intend to display in the widget, you can define the relations between them.
41
41
@@ -74,23 +74,23 @@ The content of an item is always refreshed automatically. The children of new it
74
74
75
75
#### Case: add a new child when the reference owner is the child
76
76
77
-
Sadly, this cannot detected by the widget, as it does not trigger a change on the parent, and the child is not in the treeview yet. If you need this behavior, using a child burst attribute (on the parent entity) is the way to go. Whenever the the treeview receives a new value for this attribute, it reloads the children of an item. The flower list example demonstrates this nicely.
77
+
Sadly, this cannot detected by the widget, as it does not trigger a change on the parent, and the child is not in the treeview yet. If you need this behavior, using a cache bust attribute (on the parent entity) is the way to go. Whenever the the treeview receives a new value for this attribute, it reloads the children of an item. The flower list example demonstrates this nicely.
78
78
79
79
#### Case: an object is deleted from the database entirely
80
80
81
81
The treeview always picks it up when an object is removed from a reference(set). However, if an object is deleted entirely, this will not result on a change of the the reference(set).
82
82
83
83
If the owner of the reference is not the object being deleted, just remove the referred object from the reference first and then delete that object (that can be done in the same microflow).
84
84
85
-
If the owner of the reference is the object being deleted, the parent needs to be refreshed manually, again this can be done by using the case burst attribute of the parent.
85
+
If the owner of the reference is the object being deleted, the parent needs to be refreshed manually, again this can be done by using the cache bust attribute of the parent.
86
86
87
87
#### Case: an object is added to a constrained relation
88
88
89
89
See the next section
90
90
91
91
## Advanced: Constrained relations
92
92
93
-
When removing an item from a constrained relation, this is handled in the same way as removing an object from an unconstrained relation. However **adding a child to a constrained relation is never picked up automatically**, as the new object might not pass the given constraint. To avoid unnecessary retrieves from the server, you need to indicate in your model that an object needs to refetch its children by the burst attribute as explained above.
93
+
When removing an item from a constrained relation, this is handled in the same way as removing an object from an unconstrained relation. However **adding a child to a constrained relation is never picked up automatically**, as the new object might not pass the given constraint. To avoid unnecessary retrieves from the server, you need to indicate in your model that an object needs to refetch its children by the cache bust attribute as explained above.
94
94
95
95
## Advanced: Drag and drop
96
96
Enabling drag and drop on a relation allows items to be both dragged from it and dropped to it. The widget automatically calculates where an item can be dropped, based on the type of the object your are holding, the object or relation you are dragging over and the copy state.
<description>Depending on the value of this property, the children of an item will be reloaded. If this property is omitted, the widget tries to automatically discover which items need to be refreshed, but new objects with a from child assocation cannot be detected automatically.
57
57
58
-
!Important note!: If a cacheburst attribute is set, this attribute needs to be update to show new children on assiations which are owned by children and use an xpath constraint. This way it can be assured that items do not slip past constraints by changing them.
58
+
!Important note!: If a cache bust attribute is set, this attribute needs to be update to show new children on assiations which are owned by children and use an xpath constraint. This way it can be assured that items do not slip past constraints by changing them.
59
59
60
-
Furthermore, the cacheburst is used as hint when to expand items. If the cacheburst of an item changes after invoking a microflow, it is assumed that there are new children to display. The item is expanded and the newest child will be selected.
60
+
Furthermore, the cache bust is used as hint when to expand items. If the cache bust of an item changes after invoking a microflow, it is assumed that there are new children to display. The item is expanded and the newest child will be selected.
0 commit comments