You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/06/27 06:18:47 UTC

[isis] branch master updated: ISIS-2971: [Demo] adds showcase for Enums (as value-types)

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

ahuber 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 acc6eec850 ISIS-2971: [Demo] adds showcase for Enums (as value-types)
acc6eec850 is described below

commit acc6eec8506ddac3d9e28739a1a16537cbbe7415
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Jun 27 08:18:39 2022 +0200

    ISIS-2971: [Demo] adds showcase for Enums (as value-types)
---
 .../src/main/java/demoapp/dom/DemoModuleJpa.java   |  2 +
 .../src/main/java/demoapp/dom/menubars.layout.xml  |  1 +
 .../dom/types/javalang/JavaLangTypesMenu.java      |  7 ++
 .../types/javalang/enums/JavaLangEnums-common.adoc | 66 +++++++++++++++
 .../javalang/enums/JavaLangEnums-description.adoc  | 29 +++++++
 .../dom/types/javalang/enums/JavaLangEnums.java    | 83 +++++++++++++++++++
 .../types/javalang/enums/JavaLangEnums.layout.xml  | 57 +++++++++++++
 .../javalang/enums/holder/JavaLangEnumHolder.java  | 42 ++++++++++
 .../javalang/enums/holder/JavaLangEnumHolder2.java | 76 +++++++++++++++++
 .../holder/JavaLangEnumHolder_actionReturning.java | 41 +++++++++
 ...vaLangEnumHolder_actionReturningCollection.java | 50 +++++++++++
 .../holder/JavaLangEnumHolder_mixinProperty.java   | 43 ++++++++++
 ...gEnumHolder_updateReadOnlyOptionalProperty.java | 60 ++++++++++++++
 ...JavaLangEnumHolder_updateReadOnlyProperty.java} | 52 ++++++------
 ...umHolder_updateReadOnlyPropertyWithChoices.java | 69 ++++++++++++++++
 .../enums/jdo/JavaLangEnumJdo-description.adoc     | 18 ++++
 .../types/javalang/enums/jdo/JavaLangEnumJdo.java  | 84 +++++++++++++++++++
 .../enums/jdo/JavaLangEnumJdoEntities.java         | 41 +++++++++
 .../enums/jpa/JavaLangEnumJpa-description.adoc     | 23 ++++++
 .../types/javalang/enums/jpa/JavaLangEnumJpa.java  | 96 ++++++++++++++++++++++
 .../enums/jpa/JavaLangEnumJpaEntities.java         | 41 +++++++++
 .../enums/persistence/JavaLangEnumEntity.java      | 43 ++++++++++
 .../persistence/JavaLangEnumEntity.layout.xml      | 56 +++++++++++++
 .../enums/persistence/JavaLangEnumSeeding.java     | 38 +++++++++
 .../dom/types/javalang/enums/samples/DemoEnum.java | 26 ++++++
 .../enums/samples/JavaLangEnumSamples.java         | 38 +++++++++
 .../enums/vm/JavaLangEnumVm-description.adoc       | 17 ++++
 .../types/javalang/enums/vm/JavaLangEnumVm.java    | 84 +++++++++++++++++++
 .../javalang/enums/vm/JavaLangEnumVm.layout.xml    | 56 +++++++++++++
 .../scalars/ScalarPanelTextFieldAbstract.java      |  3 +-
 30 files changed, 1314 insertions(+), 28 deletions(-)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJpa.java b/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJpa.java
index 957210aa76..996f8a5b86 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJpa.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJpa.java
@@ -53,6 +53,7 @@ import demoapp.dom.types.javalang.booleans.jpa.WrapperBooleanJpa;
 import demoapp.dom.types.javalang.bytes.jpa.WrapperByteJpa;
 import demoapp.dom.types.javalang.characters.jpa.WrapperCharacterJpa;
 import demoapp.dom.types.javalang.doubles.jpa.WrapperDoubleJpa;
+import demoapp.dom.types.javalang.enums.jpa.JavaLangEnumJpa;
 import demoapp.dom.types.javalang.floats.jpa.WrapperFloatJpa;
 import demoapp.dom.types.javalang.integers.jpa.WrapperIntegerJpa;
 import demoapp.dom.types.javalang.longs.jpa.WrapperLongJpa;
@@ -101,6 +102,7 @@ import demoapp.dom.types.primitive.shorts.jpa.PrimitiveShortJpa;
 
         JavaAwtBufferedImageJpa.class,
 
+        JavaLangEnumJpa.class,
         JavaLangStringJpa.class,
 
         JavaMathBigDecimalJpa.class,
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
index 8bdc5c8839..ff5fc6d8be 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
@@ -167,6 +167,7 @@ For latest we use: https://raw.githubusercontent.com/apache/isis/master/antora/s
             </mb3:section>
             <mb3:section>
                 <mb3:named>Common</mb3:named>
+                <mb3:serviceAction objectType="demo.JavaLangTypesMenu" id="enums"/>
                 <mb3:serviceAction objectType="demo.JavaLangTypesMenu" id="strings"/>
                 <mb3:serviceAction objectType="demo.JavaLangTypesMenu" id="voids"/>
             </mb3:section>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/JavaLangTypesMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/JavaLangTypesMenu.java
index 294d28c041..7958ed16e1 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/JavaLangTypesMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/JavaLangTypesMenu.java
@@ -29,6 +29,7 @@ import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.PriorityPrecedence;
 import org.apache.isis.applib.annotation.SemanticsOf;
 
+import demoapp.dom.types.javalang.enums.JavaLangEnums;
 import demoapp.dom.types.javalang.strings.JavaLangStrings;
 import demoapp.dom.types.javalang.voids.JavaLangVoids;
 
@@ -42,6 +43,12 @@ import demoapp.dom.types.javalang.voids.JavaLangVoids;
 @javax.annotation.Priority(PriorityPrecedence.EARLY)
 public class JavaLangTypesMenu {
 
+    @Action(semantics = SemanticsOf.SAFE)
+    @ActionLayout(cssClassFa="fa-solid fa-ellipsis-vertical")
+    public JavaLangEnums enums(){
+        return new JavaLangEnums();
+    }
+
     @Action(semantics = SemanticsOf.SAFE)
     @ActionLayout(cssClassFa="fa-font")
     public JavaLangStrings strings(){
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-common.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-common.adoc
new file mode 100644
index 0000000000..f0f12787f3
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-common.adoc
@@ -0,0 +1,66 @@
+:Notice: 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 ag [...]
+
+== Mixin actions
+
+A number of mixin actions contribute through the `JavaLangEnumHolder` interface, 
+demonstrate the use of `java.lang.enum` as a parameter and as a return type.
+For example:
+
+* the `updateReadOnlyProperty` action is:
++
+[source,java]
+----
+include::holder/JavaLangEnumHolder_updateReadOnlyProperty.java[tags=class]
+----
+
+* the `updateReadOnlyOptionalProperty` action is:
++
+[source,java]
+----
+include::holder/JavaLangEnumHolder_updateReadOnlyOptionalProperty.java[tags=class]
+----
+
+* the `actionReturning` action is:
++
+[source,java]
+----
+include::holder/JavaLangEnumHolder_actionReturning.java[tags=class]
+----
+
+
+* the `actionReturningCollection` action is:
++
+[source,java]
+----
+include::holder/JavaLangEnumHolder_actionReturningCollection.java[tags=class]
+----
+
+== Mixin properties
+
+We also use the interface to contribute a mixin property:
+
+* the `mixinProperty` property:
++
+[source,java]
+----
+include::holder/JavaLangEnumHolder_mixinProperty.java[tags=class]
+----
+
+
+== @PropertyLayout(labelPosition=...)
+
+There is also an extended interface, `JavaLangEnumHolder2`, with default methods demonstrating the use of label positions:
+
+[source,java]
+----
+include::holder/JavaLangEnumHolder2.java[tags=class]
+----
+
+<.> The default methods have annotations that are automatically inherited.
+<.> Position to the left
+<.> Using `@PropertyLayout(fieldSetId=...)` the properties into the appropriate `<field-set>` within the `Xxx.layout.xml` layout file.
+<.> Position label on top
+<.> Position label to the right
++
+CAUTION: currently not supported
+<.> Hide the label completely.
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-description.adoc
new file mode 100644
index 0000000000..932c8f0fd1
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums-description.adoc
@@ -0,0 +1,29 @@
+:Notice: 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 ag [...]
+
+The framework has built-in support for the `java.lang.enum` data type.
+
+From here you can:
+
+* navigate to an entity that uses the `java.lang.enum` datatype
+* open a view model that uses the `java.lang.enum` datatype
+
+Some properties on these domain objects are mandatory, some optional.
+
+== Common interfaces
+
+The entity and view model types both implement some common interfaces.
+
+=== JavaLangEnumHolder
+
+The `JavaLangEnumHolder` interface is used to contribute a number of mixins to both types:
+
+[source,java]
+----
+include::holder/JavaLangEnumHolder.java[tags=class]
+----
+
+=== JavaLangEnumHolder2
+
+The `JavaLangEnumHolder2` interface is used to demonstrate support for label positions using `@PropertyLayout(labelPosition=...)`.
+
+Further details, along with the effect of this annotation, can be seen on the entity and view model object pages.
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums.java
new file mode 100644
index 0000000000..b03f9bd9d6
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums.java
@@ -0,0 +1,83 @@
+/*
+ *  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.javalang.enums;
+
+import java.util.List;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.Collection;
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.Editing;
+import org.apache.isis.applib.annotation.MemberSupport;
+import org.apache.isis.applib.annotation.Nature;
+import org.apache.isis.applib.annotation.ObjectSupport;
+import org.apache.isis.applib.annotation.PromptStyle;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom._infra.values.ValueHolderRepository;
+import demoapp.dom.types.Samples;
+import demoapp.dom.types.javalang.enums.persistence.JavaLangEnumEntity;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+import demoapp.dom.types.javalang.enums.vm.JavaLangEnumVm;
+
+@XmlRootElement(name = "Demo")
+@XmlType
+@XmlAccessorType(XmlAccessType.FIELD)
+@Named("demo.JavaLangEnums")
+@DomainObject(nature=Nature.VIEW_MODEL, editing=Editing.ENABLED)
+//@Log4j2
+public class JavaLangEnums implements HasAsciiDocDescription {
+
+    @ObjectSupport public String title() {
+        return "java.lang.enum data type";
+    }
+
+    @Action(semantics = SemanticsOf.SAFE)
+    @ActionLayout(promptStyle = PromptStyle.DIALOG_MODAL)
+    public JavaLangEnumVm openViewModel(final DemoEnum initialValue) {
+        return new JavaLangEnumVm(initialValue);
+    }
+    @MemberSupport public DemoEnum default0OpenViewModel() {
+        return samples.single();
+    }
+
+    @Collection
+    public List<? extends JavaLangEnumEntity> getEntities() {
+        return entities.all();
+    }
+
+    @Inject
+    @XmlTransient
+    ValueHolderRepository<DemoEnum, ? extends JavaLangEnumEntity> entities;
+
+    @Inject
+    @XmlTransient
+    Samples<DemoEnum> samples;
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums.layout.xml
new file mode 100644
index 0000000000..df52c6284a
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/JavaLangEnums.layout.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- 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. -->
+<bs3:grid
+        xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd   http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
+        xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3"
+        xmlns:cpt="http://isis.apache.org/applib/layout/component"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+	<bs3:row>
+		<bs3:col span="10" unreferencedActions="true">
+			<cpt:domainObject />
+			<cpt:action id="rebuildMetamodel"/>
+		</bs3:col>
+		<bs3:col span="2">
+			<cpt:fieldSet name="" id="sources" />
+		</bs3:col>
+	</bs3:row>
+
+	<bs3:row>
+		<bs3:col span="6">
+			<bs3:row>
+				<bs3:col span="12">
+					<cpt:collection id="entities"/>
+				</bs3:col>
+				<bs3:col span="12">
+					<cpt:action id="openViewModel"/>
+				</bs3:col>
+			</bs3:row>
+			<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
+		</bs3:col>
+		<bs3:col span="6">
+			<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="recentCommands"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
+				<cpt:property id="description"/>
+			</cpt:fieldSet>
+		</bs3:col>
+	</bs3:row>
+	<bs3:row>
+		<bs3:col span="12" unreferencedCollections="true"/>
+	</bs3:row>
+
+</bs3:grid>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder.java
new file mode 100644
index 0000000000..256dcfb445
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder.java
@@ -0,0 +1,42 @@
+/*
+ *  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.javalang.enums.holder;
+
+import javax.inject.Named;
+
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+@Named("demo.JavaLangEnumHolder")
+//tag::class[]
+public interface JavaLangEnumHolder {
+
+    DemoEnum getReadOnlyProperty();
+    void setReadOnlyProperty(DemoEnum c);
+
+    DemoEnum getReadWriteProperty();
+    void setReadWriteProperty(DemoEnum c);
+
+    DemoEnum getReadOnlyOptionalProperty();
+    void setReadOnlyOptionalProperty(DemoEnum c);
+
+    DemoEnum getReadWriteOptionalProperty();
+    void setReadWriteOptionalProperty(DemoEnum c);
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder2.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder2.java
new file mode 100644
index 0000000000..8f6098d5f9
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder2.java
@@ -0,0 +1,76 @@
+/*
+ *  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.javalang.enums.holder;
+
+import org.apache.isis.applib.annotation.LabelPosition;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.Where;
+
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+//tag::class[]
+public interface JavaLangEnumHolder2 extends JavaLangEnumHolder {
+
+    @Property                                               // <.>
+    @PropertyLayout(
+        labelPosition = LabelPosition.LEFT,                 // <.>
+        describedAs =
+            "@PropertyLayout(labelPosition=LEFT)",
+        hidden = Where.ALL_TABLES,
+        fieldSetId = "label-positions", sequence = "1")  // <.>
+    default DemoEnum getReadOnlyPropertyDerivedLabelPositionLeft() {
+        return getReadOnlyProperty();
+    }
+
+    @Property
+    @PropertyLayout(
+        labelPosition = LabelPosition.TOP,                  // <.>
+        describedAs =
+            "@PropertyLayout(labelPosition=TOP)",
+        hidden = Where.ALL_TABLES,
+        fieldSetId = "label-positions", sequence = "2")
+    default DemoEnum getReadOnlyPropertyDerivedLabelPositionTop() {
+        return getReadOnlyProperty();
+    }
+
+    @Property
+    @PropertyLayout(
+        labelPosition = LabelPosition.RIGHT,                // <.>
+        describedAs =
+            "@PropertyLayout(labelPosition=RIGHT)",
+        hidden = Where.ALL_TABLES,
+        fieldSetId = "label-positions", sequence = "3")
+    default DemoEnum getReadOnlyPropertyDerivedLabelPositionRight() {
+        return getReadOnlyProperty();
+    }
+
+    @Property
+    @PropertyLayout(
+        labelPosition = LabelPosition.NONE,                 // <.>
+        describedAs =
+            "@PropertyLayout(labelPosition=NONE)",
+        hidden = Where.ALL_TABLES,
+        fieldSetId = "label-positions", sequence = "4")
+    default DemoEnum getReadOnlyPropertyDerivedLabelPositionNone() {
+        return getReadOnlyProperty();
+    }
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_actionReturning.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_actionReturning.java
new file mode 100644
index 0000000000..9ef8046759
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_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.javalang.enums.holder;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+
+//tag::class[]
+@Action(semantics = SemanticsOf.SAFE)
+@RequiredArgsConstructor
+public class JavaLangEnumHolder_actionReturning {
+
+    private final JavaLangEnumHolder holder;
+
+    public DemoEnum act() {
+        return holder.getReadOnlyProperty();
+    }
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_actionReturningCollection.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_actionReturningCollection.java
new file mode 100644
index 0000000000..2ba0bbf252
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_actionReturningCollection.java
@@ -0,0 +1,50 @@
+/*
+ *  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.javalang.enums.holder;
+
+import java.util.Collection;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+import demoapp.dom.types.Samples;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+
+//tag::class[]
+@Action(semantics = SemanticsOf.SAFE)
+@RequiredArgsConstructor
+public class JavaLangEnumHolder_actionReturningCollection {
+
+    private final JavaLangEnumHolder holder;
+
+    public Collection<DemoEnum> act() {
+        return samples.stream()
+                .collect(Collectors.toList());
+    }
+
+    @Inject
+    Samples<DemoEnum> samples;
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_mixinProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_mixinProperty.java
new file mode 100644
index 0000000000..bfcdf432b1
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_mixinProperty.java
@@ -0,0 +1,43 @@
+/*
+ *  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.javalang.enums.holder;
+
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.Where;
+
+import lombok.RequiredArgsConstructor;
+
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+
+//tag::class[]
+@Property()
+@PropertyLayout(hidden = Where.ALL_TABLES, fieldSetId = "contributed", sequence = "1")
+@RequiredArgsConstructor
+public class JavaLangEnumHolder_mixinProperty {
+
+    private final JavaLangEnumHolder holder;
+
+    public DemoEnum prop() {
+        return holder.getReadOnlyProperty();
+    }
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_updateReadOnlyOptionalProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_updateReadOnlyOptionalProperty.java
new file mode 100644
index 0000000000..9fa271ea08
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_updateReadOnlyOptionalProperty.java
@@ -0,0 +1,60 @@
+/*
+ *  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.javalang.enums.holder;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.MemberSupport;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.PromptStyle;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+//tag::class[]
+@Action(
+        semantics = SemanticsOf.IDEMPOTENT
+)
+@ActionLayout(
+        promptStyle = PromptStyle.INLINE
+        , named = "Update"
+        , associateWith = "readOnlyOptionalProperty"
+        , sequence = "1")
+@RequiredArgsConstructor
+public class JavaLangEnumHolder_updateReadOnlyOptionalProperty {
+
+    private final JavaLangEnumHolder holder;
+
+    @MemberSupport public JavaLangEnumHolder act(
+            @Parameter(optionality = Optionality.OPTIONAL)              // <.>
+            final DemoEnum newValue
+    ) {
+        holder.setReadOnlyOptionalProperty(newValue);
+        return holder;
+    }
+
+    @MemberSupport public DemoEnum default0Act() {
+        return holder.getReadOnlyOptionalProperty();
+    }
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/JavaLangTypesMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_updateReadOnlyProperty.java
similarity index 51%
copy from examples/demo/domain/src/main/java/demoapp/dom/types/javalang/JavaLangTypesMenu.java
copy to examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_updateReadOnlyProperty.java
index 294d28c041..638c4d3d86 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/JavaLangTypesMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_updateReadOnlyProperty.java
@@ -1,4 +1,3 @@
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -17,41 +16,40 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package demoapp.dom.types.javalang;
-
-import javax.inject.Named;
+package demoapp.dom.types.javalang.enums.holder;
 
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.DomainObjectLayout;
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.NatureOfService;
-import org.apache.isis.applib.annotation.PriorityPrecedence;
+import org.apache.isis.applib.annotation.MemberSupport;
+import org.apache.isis.applib.annotation.PromptStyle;
 import org.apache.isis.applib.annotation.SemanticsOf;
 
-import demoapp.dom.types.javalang.strings.JavaLangStrings;
-import demoapp.dom.types.javalang.voids.JavaLangVoids;
+import lombok.RequiredArgsConstructor;
 
-@Named("demo.JavaLangTypesMenu")
-@DomainService(
-        nature=NatureOfService.VIEW
-)
-@DomainObjectLayout(
-        named="JavaLangTypes"
-)
-@javax.annotation.Priority(PriorityPrecedence.EARLY)
-public class JavaLangTypesMenu {
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
 
-    @Action(semantics = SemanticsOf.SAFE)
-    @ActionLayout(cssClassFa="fa-font")
-    public JavaLangStrings strings(){
-        return new JavaLangStrings();
+//tag::class[]
+@Action(
+        semantics = SemanticsOf.IDEMPOTENT
+)
+@ActionLayout(
+        promptStyle = PromptStyle.INLINE
+        , named = "Update"
+        , associateWith = "readOnlyProperty"
+        , sequence = "1")
+@RequiredArgsConstructor
+public class JavaLangEnumHolder_updateReadOnlyProperty {
+
+    private final JavaLangEnumHolder holder;
+
+    @MemberSupport public JavaLangEnumHolder act(final DemoEnum newValue) {
+        holder.setReadOnlyProperty(newValue);
+        return holder;
     }
 
-    @Action(semantics = SemanticsOf.SAFE)
-    @ActionLayout(cssClassFa="fa-clock")
-    public JavaLangVoids voids(){
-        return new JavaLangVoids();
+    @MemberSupport public DemoEnum default0Act() {
+        return holder.getReadOnlyProperty();
     }
 
 }
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_updateReadOnlyPropertyWithChoices.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_updateReadOnlyPropertyWithChoices.java
new file mode 100644
index 0000000000..0274b90162
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/holder/JavaLangEnumHolder_updateReadOnlyPropertyWithChoices.java
@@ -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 demoapp.dom.types.javalang.enums.holder;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.MemberSupport;
+import org.apache.isis.applib.annotation.PromptStyle;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+import demoapp.dom.types.Samples;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+//tag::class[]
+@Action(
+        semantics = SemanticsOf.IDEMPOTENT
+)
+@ActionLayout(
+        promptStyle = PromptStyle.INLINE
+        , named = "Update with choices"
+        , associateWith = "readOnlyProperty"
+        , sequence = "2")
+@RequiredArgsConstructor
+public class JavaLangEnumHolder_updateReadOnlyPropertyWithChoices {
+
+    private final JavaLangEnumHolder holder;
+
+    @MemberSupport public JavaLangEnumHolder act(final DemoEnum newValue) {
+        holder.setReadOnlyProperty(newValue);
+        return holder;
+    }
+
+    @MemberSupport public DemoEnum default0Act() {
+        return holder.getReadOnlyProperty();
+    }
+
+    @MemberSupport public List<DemoEnum> choices0Act() {
+        return samples.stream()
+                .collect(Collectors.toList());
+    }
+
+    @Inject
+    Samples<DemoEnum> samples;
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jdo/JavaLangEnumJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jdo/JavaLangEnumJdo-description.adoc
new file mode 100644
index 0000000000..77864bcb02
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jdo/JavaLangEnumJdo-description.adoc
@@ -0,0 +1,18 @@
+:Notice: 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 ag [...]
+
+JDO supports `java.lang.enum` out-of-the-box, so no special annotations are required.
+
+[source,java]
+----
+include::JavaLangEnumJdo.java[tags=class]
+----
+<.> a no-arg constructor is introduced by JDO enhancer
+<.> required property as defined to JDO/DataNucleus.
++
+Apache Isis assumes properties are mandatory, so no additional annotation is required.
+<.> directly editable property as defined to Apache Isis
+<.> optional property as defined to Apache Isis
+<.> optional property as defined to JDO/DataNucleus
+
+
+include::../JavaLangEnums-common.adoc[]
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jdo/JavaLangEnumJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jdo/JavaLangEnumJdo.java
new file mode 100644
index 0000000000..5857850779
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jdo/JavaLangEnumJdo.java
@@ -0,0 +1,84 @@
+/*
+ *  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.javalang.enums.jdo;
+
+import javax.inject.Named;
+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 org.springframework.context.annotation.Profile;
+
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.Editing;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.Title;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import demoapp.dom.types.javalang.enums.persistence.JavaLangEnumEntity;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+@Profile("demo-jdo")
+//tag::class[]
+@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
+@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
+@Named("demo.JavaLangEnumJdo")
+@DomainObject
+public class JavaLangEnumJdo
+        extends JavaLangEnumEntity {
+
+//end::class[]
+    public JavaLangEnumJdo(final DemoEnum initialValue) {
+        this.readOnlyProperty = initialValue;
+        this.readWriteProperty = initialValue;
+    }
+
+//tag::class[]
+    @Title(prepend = "java.lang.enum JDO entity: ")
+    @PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
+    @Column(allowsNull = "false")                                               // <.>
+    @Getter @Setter
+    private DemoEnum readOnlyProperty;
+
+    @Property(editing = Editing.ENABLED)                                        // <.>
+    @PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
+    @Column(allowsNull = "false")
+    @Getter @Setter
+    private DemoEnum readWriteProperty;
+
+    @Property(optionality = Optionality.OPTIONAL)                               // <.>
+    @PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
+    @Column(allowsNull = "true")                                                // <.>
+    @Getter @Setter
+    private DemoEnum readOnlyOptionalProperty;
+
+    @Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
+    @PropertyLayout(fieldSetId = "optional-properties", sequence = "2")
+    @Column(allowsNull = "true")
+    @Getter @Setter
+    private DemoEnum readWriteOptionalProperty;
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jdo/JavaLangEnumJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jdo/JavaLangEnumJdoEntities.java
new file mode 100644
index 0000000000..1eaa8fb037
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jdo/JavaLangEnumJdoEntities.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.javalang.enums.jdo;
+
+import org.springframework.context.annotation.Profile;
+import org.springframework.stereotype.Service;
+
+import demoapp.dom._infra.values.ValueHolderRepository;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+@Profile("demo-jdo")
+@Service
+public class JavaLangEnumJdoEntities
+extends ValueHolderRepository<DemoEnum, JavaLangEnumJdo> {
+
+    protected JavaLangEnumJdoEntities() {
+        super(JavaLangEnumJdo.class);
+    }
+
+    @Override
+    protected JavaLangEnumJdo newDetachedEntity(final DemoEnum value) {
+        return new JavaLangEnumJdo(value);
+    }
+
+}
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jpa/JavaLangEnumJpa-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jpa/JavaLangEnumJpa-description.adoc
new file mode 100644
index 0000000000..deef503970
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jpa/JavaLangEnumJpa-description.adoc
@@ -0,0 +1,23 @@
+:Notice: 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 ag [...]
+
+[WARNING]
+==== 
+TODO this yet is just a copy from JDO
+====
+
+JDO supports `java.lang.enum` out-of-the-box, so no special annotations are required.
+
+[source,java]
+----
+include::JavaLangEnumJpa.java[tags=class]
+----
+<.> a no-arg constructor is introduced by JDO enhancer
+<.> required property as defined to JDO/DataNucleus.
++
+Apache Isis assumes properties are mandatory, so no additional annotation is required.
+<.> directly editable property as defined to Apache Isis
+<.> optional property as defined to Apache Isis
+<.> optional property as defined to JDO/DataNucleus
+
+
+include::../JavaLangEnums-common.adoc[]
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jpa/JavaLangEnumJpa.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jpa/JavaLangEnumJpa.java
new file mode 100644
index 0000000000..cd9f1878d1
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jpa/JavaLangEnumJpa.java
@@ -0,0 +1,96 @@
+/*
+ *  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.javalang.enums.jpa;
+
+import javax.inject.Named;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EntityListeners;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.springframework.context.annotation.Profile;
+
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.Editing;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.Title;
+import org.apache.isis.persistence.jpa.applib.integration.IsisEntityListener;
+
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+import demoapp.dom.types.javalang.enums.persistence.JavaLangEnumEntity;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+@Profile("demo-jpa")
+//tag::class[]
+@Entity
+@Table(
+      schema = "demo",
+      name = "JavaLangEnumJpa"
+)
+@EntityListeners(IsisEntityListener.class)
+@Named("demo.JavaLangEnumJpa")
+@DomainObject
+@NoArgsConstructor
+public class JavaLangEnumJpa
+        extends JavaLangEnumEntity {
+
+//end::class[]
+    public JavaLangEnumJpa(final DemoEnum initialValue) {
+        this.readOnlyProperty = initialValue;
+        this.readWriteProperty = initialValue;
+    }
+
+//tag::class[]
+    @Id
+    @GeneratedValue
+    private Long id;
+
+    @Title(prepend = "java.lang.enum JPA entity: ")
+    @PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
+    @Column(nullable = false)                                                   // <.>
+    @Getter @Setter
+    private DemoEnum readOnlyProperty;
+
+    @Property(editing = Editing.ENABLED)                                        // <.>
+    @PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
+    @Column(nullable = false)
+    @Getter @Setter
+    private DemoEnum readWriteProperty;
+
+    @Property(optionality = Optionality.OPTIONAL)                               // <.>
+    @PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
+    @Column(nullable = true)                                                    // <.>
+    @Getter @Setter
+    private DemoEnum readOnlyOptionalProperty;
+
+    @Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
+    @PropertyLayout(fieldSetId = "optional-properties", sequence = "2")
+    @Column(nullable = true)
+    @Getter @Setter
+    private DemoEnum readWriteOptionalProperty;
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jpa/JavaLangEnumJpaEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jpa/JavaLangEnumJpaEntities.java
new file mode 100644
index 0000000000..855f9ba171
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/jpa/JavaLangEnumJpaEntities.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.javalang.enums.jpa;
+
+import org.springframework.context.annotation.Profile;
+import org.springframework.stereotype.Service;
+
+import demoapp.dom._infra.values.ValueHolderRepository;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+@Profile("demo-jpa")
+@Service
+public class JavaLangEnumJpaEntities
+extends ValueHolderRepository<DemoEnum, JavaLangEnumJpa> {
+
+    protected JavaLangEnumJpaEntities() {
+        super(JavaLangEnumJpa.class);
+    }
+
+    @Override
+    protected JavaLangEnumJpa newDetachedEntity(final DemoEnum value) {
+        return new JavaLangEnumJpa(value);
+    }
+
+}
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/persistence/JavaLangEnumEntity.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/persistence/JavaLangEnumEntity.java
new file mode 100644
index 0000000000..cc885f5795
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/persistence/JavaLangEnumEntity.java
@@ -0,0 +1,43 @@
+/*
+ *  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.javalang.enums.persistence;
+
+import javax.inject.Named;
+
+import org.apache.isis.applib.annotation.DomainObject;
+
+import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom._infra.values.ValueHolder;
+import demoapp.dom.types.javalang.enums.holder.JavaLangEnumHolder2;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+@Named("demo.JavaLangEnumEntity") // shared permissions with concrete sub class
+@DomainObject
+public abstract class JavaLangEnumEntity
+implements
+    HasAsciiDocDescription,
+    JavaLangEnumHolder2,
+    ValueHolder<DemoEnum> {
+
+    @Override
+    public DemoEnum value() {
+        return getReadOnlyProperty();
+    }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/persistence/JavaLangEnumEntity.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/persistence/JavaLangEnumEntity.layout.xml
new file mode 100644
index 0000000000..fe9ce77481
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/persistence/JavaLangEnumEntity.layout.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- 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. -->
+<bs3:grid
+        xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd   http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
+        xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3"
+        xmlns:cpt="http://isis.apache.org/applib/layout/component"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+	<bs3:row>
+		<bs3:col span="10" unreferencedActions="true">
+			<cpt:domainObject />
+			<cpt:action id="actionReturning"/>
+			<cpt:action id="actionReturningCollection"/>
+		</bs3:col>
+		<bs3:col span="2">
+			<cpt:fieldSet name="" id="sources" />
+		</bs3:col>
+	</bs3:row>
+
+	<bs3:row>
+		<bs3:col span="6">
+			<cpt:fieldSet name="Read Only Properties" id="read-only-properties"/>
+			<cpt:fieldSet name="Editable Properties" id="editable-properties"/>
+			<cpt:fieldSet name="Optional Properties" id="optional-properties"/>
+			<cpt:fieldSet name="Contributed by Mixins" id="contributed"/>
+			<cpt:fieldSet name="@PropertyLayout(labelPosition=...)" id="label-positions"/>
+			<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
+		</bs3:col>
+		<bs3:col span="6">
+			<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="recentCommands"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="downloadJdoMetadata"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
+				<cpt:property id="description"/>
+			</cpt:fieldSet>
+		</bs3:col>
+	</bs3:row>
+	<bs3:row>
+		<bs3:col span="12" unreferencedCollections="true"/>
+	</bs3:row>
+
+</bs3:grid>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/persistence/JavaLangEnumSeeding.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/persistence/JavaLangEnumSeeding.java
new file mode 100644
index 0000000000..975ce1cb03
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/persistence/JavaLangEnumSeeding.java
@@ -0,0 +1,38 @@
+/*
+ *  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.javalang.enums.persistence;
+
+import javax.inject.Inject;
+
+import org.springframework.stereotype.Service;
+
+import demoapp.dom._infra.seed.SeedServiceAbstract;
+import demoapp.dom._infra.values.ValueHolderRepository;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+@Service
+public class JavaLangEnumSeeding
+extends SeedServiceAbstract {
+
+    @Inject
+    public JavaLangEnumSeeding(final ValueHolderRepository<DemoEnum, ? extends JavaLangEnumEntity> entities) {
+        super(entities);
+    }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/samples/DemoEnum.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/samples/DemoEnum.java
new file mode 100644
index 0000000000..691aa88873
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/samples/DemoEnum.java
@@ -0,0 +1,26 @@
+/*
+ *  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.javalang.enums.samples;
+
+public enum DemoEnum {
+    CIRCLE,
+    TRIANGLE,
+    SQUARE,
+    PENTAGON
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/samples/JavaLangEnumSamples.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/samples/JavaLangEnumSamples.java
new file mode 100644
index 0000000000..69b8036fb4
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/samples/JavaLangEnumSamples.java
@@ -0,0 +1,38 @@
+/*
+ *  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.javalang.enums.samples;
+
+import java.util.stream.Stream;
+
+import org.springframework.stereotype.Service;
+
+import lombok.SneakyThrows;
+
+import demoapp.dom.types.Samples;
+
+@Service
+public class JavaLangEnumSamples implements Samples<DemoEnum> {
+
+    @SneakyThrows
+    @Override
+    public Stream<DemoEnum> stream() {
+        return Stream.of(DemoEnum.values());
+    }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/vm/JavaLangEnumVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/vm/JavaLangEnumVm-description.adoc
new file mode 100644
index 0000000000..819a2f7b90
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/vm/JavaLangEnumVm-description.adoc
@@ -0,0 +1,17 @@
+:Notice: 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 ag [...]
+
+JAXB would seem to support `java.lang.enum` out-of-the-box, so no special annotations are required.
+
+[source,java]
+----
+include::JavaLangEnumVm.java[tags=class]
+----
+<.> a no-arg constructor is required by JAXB
+<.> required property as defined to JAXB
+<.> directly editable property as defined to Apache Isis
+<.> optional property as defined to Apache Isis.
++
+This is the default for JAXB so no additional annotation required.
+
+
+include::../JavaLangEnums-common.adoc[]
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/vm/JavaLangEnumVm.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/vm/JavaLangEnumVm.java
new file mode 100644
index 0000000000..db49c21ebf
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/vm/JavaLangEnumVm.java
@@ -0,0 +1,84 @@
+/*
+ *  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.javalang.enums.vm;
+
+import javax.inject.Named;
+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.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.PropertyLayout;
+import org.apache.isis.applib.annotation.Title;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.types.javalang.enums.holder.JavaLangEnumHolder2;
+import demoapp.dom.types.javalang.enums.samples.DemoEnum;
+
+//tag::class[]
+@XmlRootElement(name = "root")
+@XmlType
+@XmlAccessorType(XmlAccessType.FIELD)
+@Named("demo.JavaLangEnumVm")
+@DomainObject(
+        nature=Nature.VIEW_MODEL)
+@lombok.NoArgsConstructor                                                       // <.>
+public class JavaLangEnumVm
+        implements HasAsciiDocDescription, JavaLangEnumHolder2 {
+
+//end::class[]
+    public JavaLangEnumVm(final DemoEnum initialValue) {
+        this.readOnlyProperty = initialValue;
+        this.readWriteProperty = initialValue;
+    }
+
+//tag::class[]
+    @Title(prepend = "java.lang.enum view model: ")
+    @PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
+    @XmlElement(required = true)                                                // <.>
+    @Getter @Setter
+    private DemoEnum readOnlyProperty;
+
+    @Property(editing = Editing.ENABLED)                                        // <.>
+    @PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
+    @XmlElement(required = true)
+    @Getter @Setter
+    private DemoEnum readWriteProperty;
+
+    @Property(optionality = Optionality.OPTIONAL)                               // <.>
+    @PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
+    @Getter @Setter
+    private DemoEnum readOnlyOptionalProperty;
+
+    @Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
+    @PropertyLayout(fieldSetId = "optional-properties", sequence = "2")
+    @Getter @Setter
+    private DemoEnum readWriteOptionalProperty;
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/vm/JavaLangEnumVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/vm/JavaLangEnumVm.layout.xml
new file mode 100644
index 0000000000..fe9ce77481
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/enums/vm/JavaLangEnumVm.layout.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- 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. -->
+<bs3:grid
+        xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd   http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
+        xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3"
+        xmlns:cpt="http://isis.apache.org/applib/layout/component"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+	<bs3:row>
+		<bs3:col span="10" unreferencedActions="true">
+			<cpt:domainObject />
+			<cpt:action id="actionReturning"/>
+			<cpt:action id="actionReturningCollection"/>
+		</bs3:col>
+		<bs3:col span="2">
+			<cpt:fieldSet name="" id="sources" />
+		</bs3:col>
+	</bs3:row>
+
+	<bs3:row>
+		<bs3:col span="6">
+			<cpt:fieldSet name="Read Only Properties" id="read-only-properties"/>
+			<cpt:fieldSet name="Editable Properties" id="editable-properties"/>
+			<cpt:fieldSet name="Optional Properties" id="optional-properties"/>
+			<cpt:fieldSet name="Contributed by Mixins" id="contributed"/>
+			<cpt:fieldSet name="@PropertyLayout(labelPosition=...)" id="label-positions"/>
+			<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
+		</bs3:col>
+		<bs3:col span="6">
+			<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="recentCommands"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="downloadJdoMetadata"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
+				<cpt:property id="description"/>
+			</cpt:fieldSet>
+		</bs3:col>
+	</bs3:row>
+	<bs3:row>
+		<bs3:col span="12" unreferencedCollections="true"/>
+	</bs3:row>
+
+</bs3:grid>
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java
index ab03f754e1..1a0c46d559 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java
@@ -93,8 +93,9 @@ extends ScalarPanelFormFieldAbstract<T> {
 
     protected final IModel<T> unwrappedModel() {
         _Assert.assertTrue(scalarModel().getScalarTypeSpec().isAssignableFrom(type), ()->
-            String.format("[%s] cannot possibly unwrap model of type %s into target type %s",
+            String.format("[%s:%s] cannot possibly unwrap model of type %s into target type %s",
                     this.getClass().getSimpleName(),
+                    scalarModel().getIdentifier(),
                     scalarModel().getScalarTypeSpec().getCorrespondingClass(),
                     type));