This is an automated email from the ASF dual-hosted git repository. joergrade pushed a commit to branch ISIS-3171 in repository https://gitbox.apache.org/repos/asf/causeway.git
commit 2f2f71a67a4e39df0897e1a02489bd6636d71033 Author: Jörg Rade <[email protected]> AuthorDate: Thu Feb 23 21:07:22 2023 +0100 ISIS-3171 Collection and Object displayed --- .../kroviz/core/aggregator/ActionDispatcher.kt | 2 +- .../kroviz/core/aggregator/CollectionAggregator.kt | 2 +- .../core/aggregator/DomainTypesAggregator.kt | 3 +- .../kroviz/core/aggregator/ObjectAggregator.kt | 22 ++++--- .../kroviz/core/aggregator/SystemAggregator.kt | 9 +-- .../client/kroviz/core/model/CollectionDM.kt | 8 +-- .../client/kroviz/core/model/ColumnProperties.kt | 41 +++++++++++++ ...ertySpecification.kt => ColumnSpecification.kt} | 2 +- ...ationHolder.kt => ColumnSpecificationHolder.kt} | 16 ++--- .../causeway/client/kroviz/core/model/ObjectDM.kt | 15 ++++- .../kroviz/core/model/ObjectSpecificationHolder.kt | 69 ++++++++++++++++++++++ .../apache/causeway/client/kroviz/to/Property.kt | 6 ++ .../causeway/client/kroviz/to/bs/PropertyBs.kt | 2 +- .../client/kroviz/ui/builder/ColBuilder.kt | 3 +- .../client/kroviz/ui/core/ColumnFactory.kt | 4 +- .../causeway/client/kroviz/ui/core/ViewManager.kt | 9 +++ 16 files changed, 178 insertions(+), 35 deletions(-) diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/ActionDispatcher.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/ActionDispatcher.kt index ed33ef6a1b..8f34746442 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/ActionDispatcher.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/ActionDispatcher.kt @@ -50,7 +50,7 @@ class ActionDispatcher(private val at: Point = Point(100, 100)) : BaseAggregator } to is Restful -> {} else -> { - console.log(to) +// console.log(to) // throw Throwable("[ActionDispatcher.update] ${to!!::class.simpleName}") } } diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/CollectionAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/CollectionAggregator.kt index 558fda52ac..e990959d77 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/CollectionAggregator.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/CollectionAggregator.kt @@ -108,7 +108,7 @@ class CollectionAggregator(actionTitle: String, private val parent: ObjectAggreg // collection layout needs only to be initialized once with an object (pars pro toto, prototype) // obj acts as a kind prototype - we assume all elements in the collection have the same structure - val propertySpecificationHolder = getDisplayModel().propertySpecificationHolder + val propertySpecificationHolder = getDisplayModel().columnSpecificationHolder if (!propertySpecificationHolder.isInitialized()) { val members = tObj.getProperties() members.forEach { m -> diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/DomainTypesAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/DomainTypesAggregator.kt index 06b74a3a24..e5a1963b2a 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/DomainTypesAggregator.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/DomainTypesAggregator.kt @@ -49,8 +49,7 @@ class DomainTypesAggregator(val url: String) : BaseAggregator() { } private fun handleAction(obj: Action) { - console.log("[DTA.handleAction] $obj") - throw Throwable("[DomainTypesAggregator.handleAction] not implemented yet") //dsp.addData(obj) + TODO("[DomainTypesAggregator.handleAction] not implemented yet") } private fun handleDomainType(obj: DomainType) { diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/ObjectAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/ObjectAggregator.kt index 32b12dce3b..202b634238 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/ObjectAggregator.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/ObjectAggregator.kt @@ -35,7 +35,8 @@ import org.apache.causeway.client.kroviz.utils.StringUtils * (3) ???_OBJECT_PROPERTY PropertyHandler -> invoke() * (4) ???_PROPERTY_DESCRIPTION <PropertyDescriptionHandler> */ -class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() { +class ObjectAggregator(private val actionTitle: String) : AggregatorWithLayout() { + private var isContainedInParentCollection = false init { displayModel = ObjectDM(actionTitle) @@ -43,7 +44,9 @@ class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() { override fun update(logEntry: LogEntry, subType: String?) { super.update(logEntry, subType) - if (!logEntry.isUpdatedFromParentedCollection()) { + if (logEntry.isUpdatedFromParentedCollection()) { + isContainedInParentCollection = true + } else { val referrer = logEntry.url when (val obj = logEntry.getTransferObject()) { is TObject -> handleObject(obj, referrer) @@ -99,10 +102,15 @@ class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() { return displayModel.getObject() } - private fun handleProperty(property: Property, referrer: String) { - //(property, referrer) //FIXME - console.log("[OA_handleProperty] not handled") - console.log(property) + private fun handleProperty(p: Property, referrer: String) { + val dm = getDisplayModel() + if (p.isPropertyDescription()) { + dm.addPropertyDescription(p) + } else { + dm.addProperty(p) + val pdl = p.getDescriptionLink() ?: return + invoke(pdl, this, referrer = referrer) + } } private fun handleGrid(grid: GridBs, referrer: String) { @@ -131,7 +139,7 @@ class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() { } /** - * This is done in order to have the parent check, if it and it's children can be displayed + * This is done in order to have the parent check, if itself and it's children can be displayed */ private fun LogEntry.isUpdatedFromParentedCollection(): Boolean { return this.url == "" diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/SystemAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/SystemAggregator.kt index d50d3e764c..e186f05416 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/SystemAggregator.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/aggregator/SystemAggregator.kt @@ -24,10 +24,11 @@ import org.apache.causeway.client.kroviz.to.DomainTypes import org.apache.causeway.client.kroviz.to.User import org.apache.causeway.client.kroviz.to.Version import org.apache.causeway.client.kroviz.ui.core.SessionManager +import org.apache.causeway.client.kroviz.ui.core.ViewManager import org.apache.causeway.client.kroviz.utils.ImageUtils import org.apache.causeway.client.kroviz.utils.UrlUtils -class SystemAggregator() : BaseAggregator() { +class SystemAggregator : BaseAggregator() { init { displayModel = SystemDM("not filled (yet)") @@ -42,13 +43,13 @@ class SystemAggregator() : BaseAggregator() { if (logEntry.blob != null) { val icon = ImageUtils.extractIcon(logEntry) val url = logEntry.url - val isApplicationIcon = UrlUtils.isApplicationIcon(url) - when (isApplicationIcon) { + when (UrlUtils.isApplicationIcon(url)) { url.contains("48") -> { (displayModel as SystemDM).addSmallIcon(icon) val iconUrl = icon.image.src SessionManager.setApplicationIcon(iconUrl) } + url.contains("256") -> (displayModel as SystemDM).addLargeIcon(icon) else -> log(logEntry) } @@ -59,7 +60,7 @@ class SystemAggregator() : BaseAggregator() { } if (displayModel.readyToRender()) { -// TODO UiManager.openObjectView(this) + ViewManager.openObjectView(this) } } diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/CollectionDM.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/CollectionDM.kt index 84ded48825..a0a3b53eed 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/CollectionDM.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/CollectionDM.kt @@ -27,7 +27,7 @@ import org.apache.causeway.client.kroviz.to.bs.PropertyBs import org.apache.causeway.client.kroviz.utils.StringUtils class CollectionDM(override val title: String) : DisplayModelWithLayout() { - val propertySpecificationHolder = PropertySpecificationHolder() + val columnSpecificationHolder = ColumnSpecificationHolder() var id = "" var data = observableListOf<Exposer>() @@ -45,13 +45,13 @@ class CollectionDM(override val title: String) : DisplayModelWithLayout() { private fun addPropertyDetails(propertyBs: PropertyBs) { val id = propertyBs.id - val ps = propertySpecificationHolder.getPropertySpecification(id) + val ps = columnSpecificationHolder.getPropertySpecification(id) ps.amendWith(propertyBs) } fun addPropertyDescription(propertyDescription: PropertyDescription) { val id = propertyDescription.id - val ps = propertySpecificationHolder.getPropertySpecification(id) + val ps = columnSpecificationHolder.getPropertySpecification(id) ps.amendWith(propertyDescription) } @@ -64,7 +64,7 @@ class CollectionDM(override val title: String) : DisplayModelWithLayout() { } override fun readyToRender(): Boolean { - return propertySpecificationHolder.readyToRender() + return columnSpecificationHolder.readyToRender() } fun getTitle(): String { diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ColumnProperties.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ColumnProperties.kt new file mode 100644 index 0000000000..19513ec867 --- /dev/null +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ColumnProperties.kt @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.causeway.client.kroviz.core.model + +import org.apache.causeway.client.kroviz.layout.PropertyLt +import org.apache.causeway.client.kroviz.to.Property +import org.apache.causeway.client.kroviz.to.bs.PropertyBs + +/** + * Properties have three aspects: + * + * - Member of a DomainObject + * - Description (friendlyName, etc.) + * - Layout (hidden, labelPosition, etc.) + * + * All three are required in order to display correctly in a table. + */ +@Deprecated("Rework/Rename") +class ColumnProperties(val key: String) { + var property: Property? = null + var friendlyName: String = "" + var layout: PropertyLt? = null + var grid: PropertyBs? = null + var hidden: Boolean = false +} \ No newline at end of file diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/PropertySpecification.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ColumnSpecification.kt similarity index 98% rename from incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/PropertySpecification.kt rename to incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ColumnSpecification.kt index bbb872de0e..ee009457b7 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/PropertySpecification.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ColumnSpecification.kt @@ -28,7 +28,7 @@ import org.apache.causeway.client.kroviz.to.bs.PropertyBs * - id : attribute to be used to retrieve the value of each cell (id) * - hidden : will the column be displayed or not */ -class PropertySpecification(member: Member) { +class ColumnSpecification(member: Member) { var id = member.id var name = "" // aka: columnName, named, label, title var hidden = true diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/PropertySpecificationHolder.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ColumnSpecificationHolder.kt similarity index 74% rename from incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/PropertySpecificationHolder.kt rename to incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ColumnSpecificationHolder.kt index 05aa7f563b..15dca34982 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/PropertySpecificationHolder.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ColumnSpecificationHolder.kt @@ -20,11 +20,11 @@ package org.apache.causeway.client.kroviz.core.model import org.apache.causeway.client.kroviz.to.Member -class PropertySpecificationHolder() { - var propertySpecificationList = mutableListOf<PropertySpecification>() +class ColumnSpecificationHolder { + var columnSpecificationList = mutableListOf<ColumnSpecification>() - fun getPropertySpecification(id: String): PropertySpecification { - return propertySpecificationList.firstOrNull { it.id == id }!! + fun getPropertySpecification(id: String): ColumnSpecification { + return columnSpecificationList.firstOrNull { it.id == id }!! } fun readyToRender(): Boolean { @@ -32,7 +32,7 @@ class PropertySpecificationHolder() { } private fun arePropertySpecificationsReadyToRender(): Boolean { - propertySpecificationList.forEach { + columnSpecificationList.forEach { val ready = it.readyToRender() if (!ready) { return false @@ -42,12 +42,12 @@ class PropertySpecificationHolder() { } fun addMember(m: Member) { - val ps = PropertySpecification(m) - propertySpecificationList.add(ps) + val ps = ColumnSpecification(m) + columnSpecificationList.add(ps) } fun isInitialized(): Boolean { - return propertySpecificationList.isNotEmpty() && propertySpecificationList.size > 0 + return columnSpecificationList.isNotEmpty() && columnSpecificationList.size > 0 } } diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ObjectDM.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ObjectDM.kt index 3ed71589f1..7e44620dc4 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ObjectDM.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ObjectDM.kt @@ -25,7 +25,7 @@ import org.apache.causeway.client.kroviz.to.* import org.apache.causeway.client.kroviz.ui.core.SessionManager class ObjectDM(override val title: String) : DisplayModelWithLayout() { - + val properties = ObjectSpecificationHolder() init { layout = ObjectLayout() } @@ -53,7 +53,7 @@ class ObjectDM(override val title: String) : DisplayModelWithLayout() { } fun getCollectionDisplayModelFor(id: String): CollectionDM { - return collectionModelList.find { it.id == id }!! + return collectionModelList.firstOrNull() { it.id == id }!! } override fun readyToRender(): Boolean { @@ -61,11 +61,11 @@ class ObjectDM(override val title: String) : DisplayModelWithLayout() { data == null -> false isRendered -> false layout == null -> false - collectionModelList.size == 0 -> false else -> layout!!.readyToRender() && areCollectionsReadyToRender() } } + private fun areCollectionsReadyToRender(): Boolean { collectionModelList.forEach { if (!it.readyToRender()) @@ -85,6 +85,15 @@ class ObjectDM(override val title: String) : DisplayModelWithLayout() { } } + fun addPropertyDescription(p: Property) { + properties.addPropertyDescription(p) + } + + fun addProperty(property: Property) { + properties.addProperty(property) + } + + fun addResult(resultObject: ResultObject) { val tObj = createObjectFrom(resultObject) this.addData(tObj) diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ObjectSpecificationHolder.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ObjectSpecificationHolder.kt new file mode 100644 index 0000000000..9895740d8d --- /dev/null +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/core/model/ObjectSpecificationHolder.kt @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.causeway.client.kroviz.core.model + +import org.apache.causeway.client.kroviz.layout.PropertyLt +import org.apache.causeway.client.kroviz.to.Extensions +import org.apache.causeway.client.kroviz.to.Property + +@Deprecated("Rework/Rename") +class ObjectSpecificationHolder { + val list = mutableListOf<ColumnProperties>() + private var propertyDescriptionList = mutableListOf<Property>() + private var propertyLayoutList = mutableListOf<PropertyLt>() + var propertyList = mutableListOf<Property>() + private var descriptionsComplete = false + + fun readyToRender(): Boolean { + val ps = propertyList.size + val pls = propertyLayoutList.size + val pds = propertyDescriptionList.size + descriptionsComplete = (pds >= pls) && (ps >= pls) + return descriptionsComplete + } + + fun addProperty(property: Property) { + propertyList.add(property) + val id = property.id + val cp = findOrCreate(id) + cp.property = property + } + + fun addPropertyDescription(description: Property) { + propertyDescriptionList.add(description) + val id = description.id + val cp = findOrCreate(id) + val e: Extensions = description.extensions!! + cp.friendlyName = e.getFriendlyName() + } + + private fun findOrCreate(id: String): ColumnProperties { + var cp = find(id) + if (cp == null) { + cp = ColumnProperties(id) + list.add(cp) + } + return cp + } + + fun find(id: String): ColumnProperties? { + return list.find { it.key == id } + } + +} \ No newline at end of file diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/to/Property.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/to/Property.kt index cfa92fe569..a837a3f757 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/to/Property.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/to/Property.kt @@ -39,6 +39,12 @@ data class Property( return getType() == Represention.OBJECT_PROPERTY } + fun getDescriptionLink(): Link? { + return this.links.firstOrNull { + it.rel == Relation.DESCRIBED_BY.type + } + } + fun isPropertyDescription(): Boolean { return getType() == Represention.PROPERTY_DESCRIPTION } diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/to/bs/PropertyBs.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/to/bs/PropertyBs.kt index a9a42ee5cc..f37f7a8131 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/to/bs/PropertyBs.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/to/bs/PropertyBs.kt @@ -34,7 +34,7 @@ class PropertyBs(node: Node) : XmlLayout() { lateinit var action: ActionBs init { - // TODO improve casting, in PropertySpecification some extra check have to be performed + // TODO improve casting, in ColumnSpecification some extra check have to be performed val dn = node.asDynamic() hidden = dn.getAttribute("hidden").unsafeCast<String>() id = dn.getAttribute("id").unsafeCast<String>() diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/builder/ColBuilder.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/builder/ColBuilder.kt index 279a637fe2..3f83e6b438 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/builder/ColBuilder.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/builder/ColBuilder.kt @@ -69,10 +69,11 @@ class ColBuilder : UiBuilder() { val id = it.id val objectDM = dsp.displayModel val cdm = objectDM.getCollectionDisplayModelFor(id) + if (cdm != null) { val fsPanel = FieldsetPanel(legend = cdm.getTitle()) fsPanel.add(RoTable(cdm)) panel.add(fsPanel) - cdm.isRendered = true + cdm.isRendered = true} } return panel } diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/core/ColumnFactory.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/core/ColumnFactory.kt index dc52247e6f..bb3b1b9962 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/core/ColumnFactory.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/core/ColumnFactory.kt @@ -103,8 +103,8 @@ class ColumnFactory { collectionModel: CollectionDM, columns: MutableList<ColumnDefinition<Exposer>>, ) { - val clo = collectionModel.propertySpecificationHolder - val propSpecList = clo.propertySpecificationList + val clo = collectionModel.columnSpecificationHolder + val propSpecList = clo.columnSpecificationList if (propSpecList.size == 0) { // without this, propSpecList is empty? problem with mutable list? throw IllegalStateException() diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/core/ViewManager.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/core/ViewManager.kt index 12c3fb1ac7..37e219cf29 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/core/ViewManager.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/causeway/client/kroviz/ui/core/ViewManager.kt @@ -29,6 +29,7 @@ import kotlinx.browser.window import org.apache.causeway.client.kroviz.App import org.apache.causeway.client.kroviz.core.aggregator.BaseAggregator import org.apache.causeway.client.kroviz.core.aggregator.ObjectAggregator +import org.apache.causeway.client.kroviz.core.aggregator.SystemAggregator import org.apache.causeway.client.kroviz.core.aggregator.UndefinedDispatcher import org.apache.causeway.client.kroviz.core.event.EventStore import org.apache.causeway.client.kroviz.core.event.StatusPo @@ -172,6 +173,14 @@ object ViewManager { setNormalCursor() } + fun openObjectView(aggregator: SystemAggregator) { + console.log("[VM_openObjectView]") + val dm = aggregator.displayModel +/* val panel = RoDisplay(dm) + add(aggregator.getTitle(), panel, aggregator)*/ + dm.isRendered = true + setNormalCursor() + } fun openObjectView(aggregator: ObjectAggregator) { val dm = aggregator.getDisplayModel() val panel = RoDisplay(dm)
