You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2020/04/09 13:01:34 UTC
[isis] branch master updated: ISIS-2344 check if object is already
contained before adding
This is an automated email from the ASF dual-hosted git repository.
joergrade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 432da54 ISIS-2344 check if object is already contained before adding
432da54 is described below
commit 432da54fcafb1f907c5e5ba95b49f3904cfcf5e1
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Thu Apr 9 15:01:10 2020 +0200
ISIS-2344 check if object is already contained before adding
---
.../kotlin/org/apache/isis/client/kroviz/core/model/ListDM.kt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ListDM.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ListDM.kt
index 00f92f5..ba0c813 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ListDM.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/model/ListDM.kt
@@ -6,10 +6,14 @@ import pl.treksoft.kvision.state.observableListOf
class ListDM(override val title: String) : DisplayModelWithLayout() {
var data = observableListOf<Exposer>()
+ private var rawData = observableListOf<TransferObject>()
override fun addData(obj: TransferObject) {
- val exo = Exposer(obj as TObject)
- data.add(exo.dynamise()) //if exposer is not dynamised, data access in tables won't work
+ if (!rawData.contains(obj)) {
+ rawData.add(obj)
+ val exo = Exposer(obj as TObject)
+ data.add(exo.dynamise()) //if exposer is not dynamised, data access in tables won't work
+ }
}
override fun reset() {