Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit c2a12ba

Browse files
author
Jelte Lagendijk
committed
Merge branch 'TiborMx-patch-1'
2 parents 995935a + 177825f commit c2a12ba

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ As a prelude to your treeview setup, you need to mention all the entity types yo
3535

3636
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.
3737

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.
3939

4040
When you configured all entities you intend to display in the widget, you can define the relations between them.
4141

@@ -74,23 +74,23 @@ The content of an item is always refreshed automatically. The children of new it
7474

7575
#### Case: add a new child when the reference owner is the child
7676

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.
7878

7979
#### Case: an object is deleted from the database entirely
8080

8181
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).
8282

8383
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).
8484

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.
8686

8787
#### Case: an object is added to a constrained relation
8888

8989
See the next section
9090

9191
## Advanced: Constrained relations
9292

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.
9494

9595
## Advanced: Drag and drop
9696
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.

dist/TreeView.mpk

4 Bytes
Binary file not shown.

src/TreeView/TreeView.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ DwNGrMmTiYmBhQVsti8w8CRBDB2/4zM7S1Tgasp77oB9gjUMgAHL8OvXL5CzNwMxWIyDgz/rwKkv
5151
</enumerationValues>
5252
</property>
5353
<property key="xburstattr" type="attribute" entityProperty="xentity" required="false">
54-
<caption>Cache burst attribute</caption>
54+
<caption>Cache bust attribute</caption>
5555
<category>2) Advanced</category>
5656
<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.
5757

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.
5959

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.
6161
</description>
6262
<attributeTypes>
6363
<attributeType name="DateTime"/>

test/widgets/TreeView.mpk

4 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)