You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2020/06/21 14:00:09 UTC

[isis] 01/01: ISIS-2222: fleshes out a little bit more

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 71e06b019e658a1d2b232aa46311610ed9094f64
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Jun 21 14:59:20 2020 +0100

    ISIS-2222: fleshes out a little bit more
---
 .../demoapp/dom/homepage/DemoHomePage.layout.xml   | 15 +++---
 .../demoapp/dom/tooltip/TooltipDemo.layout.xml     |  1 -
 .../dom/types/primitive/chars/PrimitiveChars.java  | 11 ++--
 .../PrimitiveCharHolder.java}                      | 46 +++--------------
 .../PrimitiveCharHolder_actionReturning.java       | 41 +++++++++++++++
 ...PrimitiveCharHolder_updateReadOnlyProperty.java | 46 +++++++++++++++++
 ...arHolder_updateReadOnlyPropertyWithChoices.java | 59 ++++++++++++++++++++++
 .../jdo/PrimitiveCharJdoEntity-description.adoc    | 20 +++++++-
 .../chars/jdo/PrimitiveCharJdoEntity.java          | 36 ++++---------
 .../chars/jdo/PrimitiveCharJdoEntity.layout.xml    |  1 +
 .../vm/PrimitiveCharViewModel-description.adoc     |  2 +-
 .../primitive/chars/vm/PrimitiveCharViewModel.java | 45 ++++++++---------
 .../StatefulViewModelJaxbRefsEntity.layout.xml     | 15 +++---
 .../StatefulViewModelUsingJaxb.layout.xml          | 15 +++---
 14 files changed, 233 insertions(+), 120 deletions(-)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/homepage/DemoHomePage.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/homepage/DemoHomePage.layout.xml
index 55d68c2..4bd2c0c 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/homepage/DemoHomePage.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/homepage/DemoHomePage.layout.xml
@@ -6,11 +6,6 @@
 	<bs3:row>
 		<bs3:col span="10" unreferencedActions="true">
 			<cpt:domainObject />
-			<cpt:action id="clearHints" />
-			<cpt:action id="downloadLayoutXml" />
-			<cpt:action id="openRestApi" />
-			<cpt:action id="rebuildMetamodel" />
-			<cpt:action id="initDefaults" />
 		</bs3:col>
 		<bs3:col span="2">
 			<cpt:fieldSet name="" id="sources" />
@@ -24,7 +19,15 @@
 			<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
         </bs3:col>
 		<bs3:col span="6">
-			<cpt:fieldSet name="Description" id="description" />
+			<cpt:fieldSet name="Description" id="description" >
+				<cpt:action id="clearHints" position="PANEL" />
+				<cpt:action id="downloadLayoutXml"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="rebuildMetamodel"  position="PANEL"/>
+				<cpt:action id="downloadMetamodelXml"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="inspectMetamodel"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
+				<cpt:property id="description"/>
+			</cpt:fieldSet>
 		</bs3:col>
 		<bs3:col span="6" unreferencedCollections="true">
 		</bs3:col>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/tooltip/TooltipDemo.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/tooltip/TooltipDemo.layout.xml
index a36e0ff..0dc6d66 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/tooltip/TooltipDemo.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/tooltip/TooltipDemo.layout.xml
@@ -10,7 +10,6 @@
 			<cpt:action id="downloadLayoutXml" />
 			<cpt:action id="openRestApi" />
 			<cpt:action id="rebuildMetamodel" />
-			<cpt:action id="initDefaults" />
 
 		</bs3:col>
 	</bs3:row>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/PrimitiveChars.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/PrimitiveChars.java
index e72f578..18889d6 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/PrimitiveChars.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/PrimitiveChars.java
@@ -62,9 +62,10 @@ public class PrimitiveChars implements HasAsciiDocDescription {
     @Action(semantics = SemanticsOf.SAFE)
     @ActionLayout(promptStyle = PromptStyle.DIALOG_MODAL)
     public PrimitiveCharViewModel openViewModel(char initialValue) {
-        val viewModel = factoryService.viewModel(PrimitiveCharViewModel.class);
-        viewModel.setReadWriteProperty(initialValue);
-        return viewModel;
+        return new PrimitiveCharViewModel(initialValue);
+    }
+    public char default0OpenViewModel() {
+        return 'a';
     }
 
     @Collection
@@ -76,9 +77,5 @@ public class PrimitiveChars implements HasAsciiDocDescription {
     @XmlTransient
     PrimitiveCharJdoEntities entities;
 
-    @Inject
-    @XmlTransient
-    FactoryService factoryService;
-
 
 }
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder.java
similarity index 51%
copy from examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.java
copy to examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder.java
index 4090c7e..bc376be 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder.java
@@ -16,25 +16,17 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package demoapp.dom.types.primitive.chars.jdo;
+package demoapp.dom.types.primitive.chars.holder;
 
-import javax.jdo.annotations.Column;
 import javax.jdo.annotations.DatastoreIdentity;
 import javax.jdo.annotations.IdGeneratorStrategy;
 import javax.jdo.annotations.IdentityType;
 import javax.jdo.annotations.PersistenceCapable;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
 
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.Bounding;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.Nature;
-import org.apache.isis.applib.annotation.Optionality;
 import org.apache.isis.applib.annotation.Property;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.annotation.Title;
@@ -45,38 +37,12 @@ import lombok.extern.log4j.Log4j2;
 
 import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
 
-@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
-@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
-@DomainObject(bounding = Bounding.BOUNDED)
-@Log4j2
-public class PrimitiveCharJdoEntity implements HasAsciiDocDescription {
+public interface PrimitiveCharHolder {
 
-    public PrimitiveCharJdoEntity(char initialValue) {
-        this.readOnlyProperty = initialValue;
-        this.readWriteProperty = initialValue;
-    }
+    char getReadOnlyProperty();
+    void setReadOnlyProperty(char c);
 
-    @Getter
-    @Title
-    private char readOnlyProperty = 'c';
-
-    @Getter @Setter
-    @Property(editing = Editing.ENABLED)
-    private char readWriteProperty;
-
-    @Action(
-            semantics = SemanticsOf.IDEMPOTENT,
-            associateWith = "readOnlyProperty",
-            associateWithSequence = "1"
-    )
-    public PrimitiveCharJdoEntity updateReadOnlyProperty(char newValue) {
-        this.readOnlyProperty = newValue;
-        return this;
-    }
-
-    @Action(semantics = SemanticsOf.SAFE)
-    public char actionReturning() {
-        return readOnlyProperty;
-    }
+    char getReadWriteProperty();
+    void setReadWriteProperty(char c);
 
 }
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_actionReturning.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_actionReturning.java
new file mode 100644
index 0000000..8fbe3a3
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_actionReturning.java
@@ -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 demoapp.dom.types.primitive.chars.holder;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+
+@Action(
+        semantics = SemanticsOf.SAFE,
+        associateWith = "readOnlyProperty",
+        associateWithSequence = "3"
+)
+@RequiredArgsConstructor
+public class PrimitiveCharHolder_actionReturning {
+
+    private final PrimitiveCharHolder primitiveCharHolder;
+
+    public char act() {
+        return primitiveCharHolder.getReadOnlyProperty();
+    }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_updateReadOnlyProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_updateReadOnlyProperty.java
new file mode 100644
index 0000000..e898d0d
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_updateReadOnlyProperty.java
@@ -0,0 +1,46 @@
+/*
+ *  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 demoapp.dom.types.primitive.chars.holder;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+
+@Action(
+        semantics = SemanticsOf.IDEMPOTENT,
+        associateWith = "readOnlyProperty",
+        associateWithSequence = "1"
+)
+@RequiredArgsConstructor
+public class PrimitiveCharHolder_updateReadOnlyProperty {
+
+    private final PrimitiveCharHolder primitiveCharHolder;
+
+    public PrimitiveCharHolder act(char newValue) {
+        primitiveCharHolder.setReadOnlyProperty(newValue);
+        return primitiveCharHolder;
+    }
+    public char default0Act() {
+        return primitiveCharHolder.getReadOnlyProperty();
+    }
+
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_updateReadOnlyPropertyWithChoices.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_updateReadOnlyPropertyWithChoices.java
new file mode 100644
index 0000000..8bcf96d
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_updateReadOnlyPropertyWithChoices.java
@@ -0,0 +1,59 @@
+/*
+ *  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 demoapp.dom.types.primitive.chars.holder;
+
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+
+@Action(
+        semantics = SemanticsOf.IDEMPOTENT,
+        associateWith = "readOnlyProperty",
+        associateWithSequence = "2"
+)
+@RequiredArgsConstructor
+public class PrimitiveCharHolder_updateReadOnlyPropertyWithChoices {
+
+    private final PrimitiveCharHolder primitiveCharHolder;
+
+    public PrimitiveCharHolder act(char newValue) {
+        primitiveCharHolder.setReadOnlyProperty(newValue);
+        return primitiveCharHolder;
+    }
+    public char default0Act() {
+        return primitiveCharHolder.getReadOnlyProperty();
+    }
+    public List<Character> choices0Act() {
+        return Stream.of(charOf('a'), charOf('b'), charOf('c')).collect(Collectors.toList());
+    }
+    public String disableAct() {
+        return "Not yet supported";
+    }
+
+    private static Character charOf(char x) {
+        return x;
+    }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity-description.adoc
index ef897f8..f71f809 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity-description.adoc
@@ -1,3 +1,19 @@
-== char datatype
+== Entity with primitive `char` datatype
 
-TODO
\ No newline at end of file
+[source,java]
+----
+@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
+@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
+@DomainObject(bounding = Bounding.BOUNDED)
+public class PrimitiveCharJdoEntity {
+
+    @Getter @Setter
+    @Title
+    private char readOnlyProperty;
+
+    @Getter @Setter
+    @Property(editing = Editing.ENABLED)
+    private char readWriteProperty;
+
+}
+----
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.java
index 4090c7e..f4af0de 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.java
@@ -18,23 +18,16 @@
  */
 package demoapp.dom.types.primitive.chars.jdo;
 
-import javax.jdo.annotations.Column;
 import javax.jdo.annotations.DatastoreIdentity;
 import javax.jdo.annotations.IdGeneratorStrategy;
 import javax.jdo.annotations.IdentityType;
 import javax.jdo.annotations.PersistenceCapable;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
 
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.Bounding;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Editing;
 import org.apache.isis.applib.annotation.Nature;
-import org.apache.isis.applib.annotation.Optionality;
 import org.apache.isis.applib.annotation.Property;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.annotation.Title;
@@ -44,39 +37,28 @@ import lombok.Setter;
 import lombok.extern.log4j.Log4j2;
 
 import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.types.primitive.chars.holder.PrimitiveCharHolder;
 
 @PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
 @DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
-@DomainObject(bounding = Bounding.BOUNDED)
-@Log4j2
-public class PrimitiveCharJdoEntity implements HasAsciiDocDescription {
+@DomainObject(
+        nature = Nature.JDO_ENTITY,
+        objectType = "demoapp.PrimitiveCharJdoEntity",
+        bounding = Bounding.BOUNDED
+)
+public class PrimitiveCharJdoEntity implements HasAsciiDocDescription, PrimitiveCharHolder {
 
     public PrimitiveCharJdoEntity(char initialValue) {
         this.readOnlyProperty = initialValue;
         this.readWriteProperty = initialValue;
     }
 
-    @Getter
+    @Getter @Setter
     @Title
-    private char readOnlyProperty = 'c';
+    private char readOnlyProperty;
 
     @Getter @Setter
     @Property(editing = Editing.ENABLED)
     private char readWriteProperty;
 
-    @Action(
-            semantics = SemanticsOf.IDEMPOTENT,
-            associateWith = "readOnlyProperty",
-            associateWithSequence = "1"
-    )
-    public PrimitiveCharJdoEntity updateReadOnlyProperty(char newValue) {
-        this.readOnlyProperty = newValue;
-        return this;
-    }
-
-    @Action(semantics = SemanticsOf.SAFE)
-    public char actionReturning() {
-        return readOnlyProperty;
-    }
-
 }
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.layout.xml
index 856b5d6..a67a68f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/jdo/PrimitiveCharJdoEntity.layout.xml
@@ -31,6 +31,7 @@
 				<cpt:action id="rebuildMetamodel"  position="PANEL"/>
 				<cpt:action id="downloadMetamodelXml"  position="PANEL_DROPDOWN"/>
 				<cpt:action id="inspectMetamodel"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="downloadJdoMetadata"  position="PANEL_DROPDOWN"/>
 				<cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
 				<cpt:property id="description"/>
 			</cpt:fieldSet>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/vm/PrimitiveCharViewModel-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/vm/PrimitiveCharViewModel-description.adoc
index ef897f8..de00096 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/vm/PrimitiveCharViewModel-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/vm/PrimitiveCharViewModel-description.adoc
@@ -1,3 +1,3 @@
-== char datatype
+== View model with `char` datatype
 
 TODO
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/vm/PrimitiveCharViewModel.java b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/vm/PrimitiveCharViewModel.java
index 5506bd8..3d57cf2 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/vm/PrimitiveCharViewModel.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/primitive/chars/vm/PrimitiveCharViewModel.java
@@ -18,9 +18,12 @@
  */
 package demoapp.dom.types.primitive.chars.vm;
 
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
@@ -28,47 +31,41 @@ import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.Editing;
 import org.apache.isis.applib.annotation.Nature;
-import org.apache.isis.applib.annotation.Optionality;
 import org.apache.isis.applib.annotation.Property;
 import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.annotation.Title;
 
 import lombok.Getter;
+import lombok.NoArgsConstructor;
 import lombok.Setter;
 import lombok.extern.log4j.Log4j2;
 
 import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.types.primitive.chars.holder.PrimitiveCharHolder;
 
 @XmlRootElement(name = "Demo")
 @XmlType
 @XmlAccessorType(XmlAccessType.FIELD)
-@DomainObject(nature=Nature.VIEW_MODEL, objectType = "demoapp.PrimitiveCharJaxbViewModel", editing=Editing.ENABLED)
-@Log4j2
-public class PrimitiveCharViewModel implements HasAsciiDocDescription {
+@DomainObject(
+        nature=Nature.VIEW_MODEL,
+        objectType = "demoapp.PrimitiveCharViewModel"
+)
+@lombok.NoArgsConstructor
+public class PrimitiveCharViewModel
+        implements HasAsciiDocDescription,
+                   PrimitiveCharHolder {
 
-    public String title() {
-        return "Char Demo";
+    public PrimitiveCharViewModel(char initialValue) {
+        this.readOnlyProperty = initialValue;
+        this.readWriteProperty = initialValue;
     }
 
-    @Getter
-    private char readOnlyProperty = 'c';
+    @Title
+    @Getter @Setter
+    private char readOnlyProperty;
 
     @Getter @Setter
     @Property(editing = Editing.ENABLED)
     private char readWriteProperty;
 
-    @Action(
-            semantics = SemanticsOf.IDEMPOTENT,
-            associateWith = "readOnlyProperty",
-            associateWithSequence = "1"
-    )
-    public PrimitiveCharViewModel updateReadOnlyProperty(char newValue) {
-        this.readOnlyProperty = newValue;
-        return this;
-    }
-
-    @Action(semantics = SemanticsOf.SAFE)
-    public char actionReturning() {
-        return readOnlyProperty;
-    }
-
 }
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/jaxbrefentity/StatefulViewModelJaxbRefsEntity.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/jaxbrefentity/StatefulViewModelJaxbRefsEntity.layout.xml
index 10569c5..1d926a6 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/jaxbrefentity/StatefulViewModelJaxbRefsEntity.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/jaxbrefentity/StatefulViewModelJaxbRefsEntity.layout.xml
@@ -6,11 +6,6 @@
 	<bs3:row>
 		<bs3:col span="10" unreferencedActions="true">
 			<cpt:domainObject />
-			<cpt:action id="clearHints" />
-			<cpt:action id="downloadLayoutXml" />
-			<cpt:action id="openRestApi" />
-			<cpt:action id="rebuildMetamodel" />
-			<cpt:action id="initDefaults" />
 		</bs3:col>
 		<bs3:col span="2">
 			<cpt:fieldSet name="" id="sources" />
@@ -25,7 +20,15 @@
 			<cpt:collection id="children"/>
         </bs3:col>
 		<bs3:col span="6">
-			<cpt:fieldSet name="Description" id="description" />
+			<cpt:fieldSet name="Description" id="description" >
+				<cpt:action id="clearHints" position="PANEL" />
+				<cpt:action id="downloadLayoutXml"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="rebuildMetamodel"  position="PANEL"/>
+				<cpt:action id="downloadMetamodelXml"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="inspectMetamodel"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
+				<cpt:property id="description"/>
+			</cpt:fieldSet>
 		</bs3:col>
 	</bs3:row>
 	<bs3:row>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/usingjaxb/StatefulViewModelUsingJaxb.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/usingjaxb/StatefulViewModelUsingJaxb.layout.xml
index 67ab0c2..9b463c3 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/usingjaxb/StatefulViewModelUsingJaxb.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/usingjaxb/StatefulViewModelUsingJaxb.layout.xml
@@ -6,11 +6,6 @@
 	<bs3:row>
 		<bs3:col span="10" unreferencedActions="true">
 			<cpt:domainObject />
-			<cpt:action id="clearHints" />
-			<cpt:action id="downloadLayoutXml" />
-			<cpt:action id="openRestApi" />
-			<cpt:action id="rebuildMetamodel" />
-			<cpt:action id="initDefaults" />
 		</bs3:col>
 		<bs3:col span="2">
 			<cpt:fieldSet name="" id="sources" />
@@ -28,7 +23,15 @@
 			<cpt:collection id="children"/>
         </bs3:col>
 		<bs3:col span="6">
-			<cpt:fieldSet name="Description" id="description" />
+			<cpt:fieldSet name="Description" id="description" >
+				<cpt:action id="clearHints" position="PANEL" />
+				<cpt:action id="downloadLayoutXml"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="rebuildMetamodel"  position="PANEL"/>
+				<cpt:action id="downloadMetamodelXml"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="inspectMetamodel"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
+				<cpt:property id="description"/>
+			</cpt:fieldSet>
 		</bs3:col>
 	</bs3:row>
 	<bs3:row>