You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2023/03/30 22:05:33 UTC

[causeway] branch master updated (cfb994d281 -> 8e6afb68b2)

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

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


    from cfb994d281 CAUSEWAY-2485: polishes a tiny bit; optimize imports
     add 2c81c3ae4b CAUSEWAY-2485: wip - @DomainObject#nature
     new 8e6afb68b2 CAUSEWAY-2485: completes @DomainObject#nature

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/demoapp/dom/DemoModuleJpa.java   |   5 +-
 .../objects/DomainObject/DomainObjectMenu.java     |  60 +++------
 ...oc => DomainObjectAliasedPage-description.adoc} |   4 +-
 ...AliasedVm.java => DomainObjectAliasedPage.java} |   2 +-
 ...yout.xml => DomainObjectAliasedPage.layout.xml} |   0
 ...up.java => DomainObjectAliasedPage_lookup.java} |   4 +-
 ...s.java => DomainObjectAliasedPage_objects.java} |   4 +-
 ... DomainObjectAutoCompletePage-description.adoc} |   7 +-
 ...teVm.java => DomainObjectAutoCompletePage.java} |   2 +-
 ...xml => DomainObjectAutoCompletePage.layout.xml} |   0
 ...java => DomainObjectAutoCompletePage_find.java} |   4 +-
 ...a => DomainObjectAutoCompletePage_objects.java} |   4 +-
 ...c => DomainObjectBoundingPage-description.adoc} |   4 +-
 ...undingVm.java => DomainObjectBoundingPage.java} |   2 +-
 ...out.xml => DomainObjectBoundingPage.layout.xml} |   0
 ....java => DomainObjectBoundingPage_objects.java} |   4 +-
 ...ind.java => DomainObjectBoundingPage_find.java} |   6 +-
 ...oc => DomainObjectEditingPage-description.adoc} |   2 +-
 ...EditingVm.java => DomainObjectEditingPage.java} |   2 +-
 ...yout.xml => DomainObjectEditingPage.layout.xml} |   0
 ...s.java => DomainObjectEditingPage_objects.java} |   4 +-
 ...ObjectEntityChangePublishingVm-description.adoc |   2 +-
 ...DomainObjectIntrospectionPage-description.adoc} |   6 +-
 ...nVm.java => DomainObjectIntrospectionPage.java} |   2 +-
 ...ml => DomainObjectIntrospectionPage.layout.xml} |   0
 ...bjectIntrospectionPage_annotationOptional.java} |   4 +-
 ...bjectIntrospectionPage_annotationRequired.java} |   4 +-
 ...ObjectIntrospectionVm_encapsulationEnabled.java |   4 +-
 .../mixinMethod/DomainObjectMixinMethod.java       |   5 +-
 ...> DomainObjectMixinMethodPage-description.adoc} |   8 +-
 ...hodVm.java => DomainObjectMixinMethodPage.java} |   8 +-
 ....xml => DomainObjectMixinMethodPage.layout.xml} |   0
 ...va => DomainObjectMixinMethodPage_objects.java} |   4 +-
 ...=> DomainObjectMixinMethodPage_updateName.java} |  11 +-
 .../nature/DomainObjectNaturePage-description.adoc |  38 ++++++
 .../DomainObjectNaturePage.java}                   |  24 ++--
 .../DomainObjectNaturePage.layout.xml}             |  11 +-
 .../nature/DomainObjectNaturePage_entities.java    |  27 ++++
 .../nature/DomainObjectNaturePage_viewModels.java  |  38 ++++++
 .../DomainObjectNatureEntity.java}                 |  30 ++---
 .../entity/DomainObjectNatureEntity.layout.xml}    |   0
 .../DomainObjectNatureEntitySeeding.java}          |   6 +-
 .../jpa/DomainObjectNatureJpa-description.adoc}    |  12 +-
 .../jpa/DomainObjectNatureJpa.java}                |  26 ++--
 .../jpa/DomainObjectNatureJpaEntities.java}        |  14 +-
 .../DomainObjectNatureViewModel-description.adoc   |  27 ++++
 .../viewmodel/DomainObjectNatureViewModel.java     |  74 +++++++++++
 .../DomainObjectNatureViewModel.layout.xml}        |  36 ++++-
 .../DomainObjectNatureViewModel_updateMessage.java |  37 ++++++
 .../jaxbrefentity/StatefulVmJaxbRefsEntity.java    | 148 ---------------------
 .../StatefulVmJaxbRefsEntity.layout.xml            |  49 -------
 .../viewmodels/jaxbrefentity/jdo/JaxbRefJdo.java   |  50 -------
 .../jaxbrefentity/jdo/JaxbRefJdoEntities.java      |  40 ------
 .../usingjaxb/StatefulVmUsingJaxb-description.adoc |  48 -------
 .../viewmodels/usingjaxb/StatefulVmUsingJaxb.java  |  98 --------------
 .../usingjaxb/StatefulVmUsingJaxb.layout.xml       |  51 -------
 .../src/main/java/demoapp/dom/menubars.layout.xml  |   3 +-
 57 files changed, 411 insertions(+), 654 deletions(-)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/aliased/{DomainObjectAliasedVm-description.adoc => DomainObjectAliasedPage-description.adoc} (97%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/aliased/{DomainObjectAliasedVm.java => DomainObjectAliasedPage.java} (95%)
 copy examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/aliased/{DomainObjectAliasedVm.layout.xml => DomainObjectAliasedPage.layout.xml} (100%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/aliased/{DomainObjectAliasedVm_lookup.java => DomainObjectAliasedPage_lookup.java} (93%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/aliased/{DomainObjectAliasedVm_objects.java => DomainObjectAliasedPage_objects.java} (87%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/autoComplete/{DomainObjectAutoCompleteVm-description.adoc => DomainObjectAutoCompletePage-description.adoc} (83%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/autoComplete/{DomainObjectAutoCompleteVm.java => DomainObjectAutoCompletePage.java} (95%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/autoComplete/{DomainObjectAutoCompleteVm.layout.xml => DomainObjectAutoCompletePage.layout.xml} (100%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/autoComplete/{DomainObjectAutoCompleteVm_find.java => DomainObjectAutoCompletePage_find.java} (84%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/autoComplete/{DomainObjectAutoCompleteVm_objects.java => DomainObjectAutoCompletePage_objects.java} (87%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/bounded/{DomainObjectBoundingVm-description.adoc => DomainObjectBoundingPage-description.adoc} (95%)
 copy examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/bounded/{DomainObjectBoundingVm.java => DomainObjectBoundingPage.java} (95%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/bounded/{DomainObjectBoundingVm.layout.xml => DomainObjectBoundingPage.layout.xml} (100%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/bounded/{DomainObjectBoundingVm_objects.java => DomainObjectBoundingPage_objects.java} (87%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/bounded/jpa/{DomainObjectBoundingVm_find.java => DomainObjectBoundingPage_find.java} (86%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/editing/{DomainObjectEditingVm-description.adoc => DomainObjectEditingPage-description.adoc} (91%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/editing/{DomainObjectEditingVm.java => DomainObjectEditingPage.java} (95%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/editing/{DomainObjectEditingVm.layout.xml => DomainObjectEditingPage.layout.xml} (100%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/editing/{DomainObjectEditingVm_objects.java => DomainObjectEditingPage_objects.java} (87%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/introspection/{DomainObjectIntrospectionVm-description.adoc => DomainObjectIntrospectionPage-description.adoc} (78%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/introspection/{DomainObjectIntrospectionVm.java => DomainObjectIntrospectionPage.java} (95%)
 copy examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/introspection/{DomainObjectIntrospectionVm.layout.xml => DomainObjectIntrospectionPage.layout.xml} (100%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/introspection/{DomainObjectIntrospectionVm_annotationOptional.java => DomainObjectIntrospectionPage_annotationOptional.java} (93%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/introspection/{DomainObjectIntrospectionVm_annotationRequired.java => DomainObjectIntrospectionPage_annotationRequired.java} (93%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/mixinMethod/{DomainObjectMixinMethodVm-description.adoc => DomainObjectMixinMethodPage-description.adoc} (94%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/mixinMethod/{DomainObjectMixinMethodVm.java => DomainObjectMixinMethodPage.java} (89%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/mixinMethod/{DomainObjectMixinMethodVm.layout.xml => DomainObjectMixinMethodPage.layout.xml} (100%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/mixinMethod/{DomainObjectMixinMethodVm_objects.java => DomainObjectMixinMethodPage_objects.java} (89%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/mixinMethod/{DomainObjectMixinMethodVm_updateName.java => DomainObjectMixinMethodPage_updateName.java} (79%)
 create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage-description.adoc
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/{bounded/DomainObjectBoundingVm.java => nature/DomainObjectNaturePage.java} (74%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/{aliased/DomainObjectAliasedVm.layout.xml => nature/DomainObjectNaturePage.layout.xml} (94%)
 create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage_entities.java
 create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage_viewModels.java
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/{viewmodels/jaxbrefentity/JaxbRefEntity.java => entity/DomainObjectNatureEntity.java} (65%)
 copy examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/{editing/DomainObjectEditing.layout.xml => nature/entity/DomainObjectNatureEntity.layout.xml} (100%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/{viewmodels/jaxbrefentity/JaxbRefSeeding.java => entity/DomainObjectNatureEntitySeeding.java} (82%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/{viewmodels/jaxbrefentity/StatefulVmJaxbRefsEntity-description.adoc => entity/jpa/DomainObjectNatureJpa-description.adoc} (70%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/{viewmodels/jaxbrefentity/jpa/JaxbRefJpa.java => entity/jpa/DomainObjectNatureJpa.java} (70%)
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/{viewmodels/jaxbrefentity/jpa/JaxbRefJpaEntities.java => entity/jpa/DomainObjectNatureJpaEntities.java} (73%)
 create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel-description.adoc
 create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel.java
 rename examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/{introspection/DomainObjectIntrospectionVm.layout.xml => nature/viewmodel/DomainObjectNatureViewModel.layout.xml} (74%)
 create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel_updateMessage.java
 delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodels/jaxbrefentity/StatefulVmJaxbRefsEntity.java
 delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodels/jaxbrefentity/StatefulVmJaxbRefsEntity.layout.xml
 delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodels/jaxbrefentity/jdo/JaxbRefJdo.java
 delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodels/jaxbrefentity/jdo/JaxbRefJdoEntities.java
 delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodels/usingjaxb/StatefulVmUsingJaxb-description.adoc
 delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodels/usingjaxb/StatefulVmUsingJaxb.java
 delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodels/usingjaxb/StatefulVmUsingJaxb.layout.xml


[causeway] 01/01: CAUSEWAY-2485: completes @DomainObject#nature

Posted by da...@apache.org.
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/causeway.git

commit 8e6afb68b2fed00703000e7e601a98b69283a81d
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Mar 30 23:04:49 2023 +0100

    CAUSEWAY-2485: completes @DomainObject#nature
---
 .../objects/DomainObject/DomainObjectMenu.java     |  5 +-
 .../nature/DomainObjectNaturePage-description.adoc | 29 +++++-----
 .../nature/DomainObjectNaturePage.java             |  5 +-
 .../nature/DomainObjectNaturePage.layout.xml       | 23 ++++----
 .../nature/DomainObjectNaturePage_entities.java    |  8 +--
 .../nature/DomainObjectNaturePage_viewModels.java  |  6 +-
 .../nature/entity/jdo/DomainObjectNatureJdo.java   | 62 ---------------------
 .../entity/jdo/DomainObjectNatureJdoEntities.java  | 40 -------------
 .../jpa/DomainObjectNatureJpa-description.adoc}    | 12 +++-
 .../nature/entity/jpa/DomainObjectNatureJpa.java   | 12 ++--
 .../DomainObjectNatureViewModel-description.adoc   | 26 ++++++++-
 .../viewmodel/DomainObjectNatureViewModel.java     | 19 +++----
 .../DomainObjectNatureViewModel.layout.xml         | 65 ++++++++++++++++------
 .../DomainObjectNatureViewModel_updateMessage.java | 37 ++++++++++++
 .../src/main/java/demoapp/dom/menubars.layout.xml  |  3 +-
 15 files changed, 166 insertions(+), 186 deletions(-)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/DomainObjectMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/DomainObjectMenu.java
index 2783e2fdce..55c8afad07 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/DomainObjectMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/DomainObjectMenu.java
@@ -87,12 +87,9 @@ public class DomainObjectMenu {
 
     @Action(semantics = SemanticsOf.SAFE)
     @ActionLayout(cssClassFa = "fa-gamepad", describedAs = "@DomainObject(nature=VIEW_MODEL) for a Stateful View Model")
-    public DomainObjectNaturePage natureStateful() {
+    public DomainObjectNaturePage nature() {
         return new DomainObjectNaturePage();
     }
-    @MemberSupport public String default0NatureStateful() {
-        return "Some initial state";
-    }
 
     @Action(semantics = SemanticsOf.SAFE)
     @ActionLayout(cssClassFa="fa-asterisk", describedAs = "Default class of the domain event emitted when interacting with the domain object's actions, properties or collections")
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage-description.adoc
index fdc57a7cf0..fcc623df75 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage-description.adoc
@@ -5,37 +5,34 @@ Domain classes fall into three broad categories:
 * (singleton) domain services representing menus, eg whose actions are rendered in the menubars.
 * domain entities, representing shared persistence state (eg `Customer`, `Order`, `Product` and so on)
 * link:https://causeway.apache.org/userguide/${CAUSEWAY_VERSION}/fun/overview.html#view-models[view models], which hold session-specific (temporary) state.
-+
 View models can be used for a variety of use cases, such as a "manager" class to handle a complicated workflow (part of an "application layer"), or as an object to render as a simplified representation of an entity (part of the "presentation layer").
 
-The object you are looking at right now is a view model; its source code is:
+Strictly speaking mixins are domain objects (with a `nature` of "MIXIN"), though they manifest as contributed domain members (properties, collections or actions) rather than as individual object instances in their own right.
+
+The object you are looking at right now is a view model.
+Its source code is:
 
 [source,java]
 .DomainObjectNaturePage.java
 ----
 include::DomainObjectNaturePage.java[tags=class]
 ----
-
 <.> Specifies this is a JAXB element.
 This is actually enough for the framework to infer that this domain object is a view model.
-<.> Nevertheless, it's generally good practice to specifuy the nature explicitly.
-
-In many cases the framework is able to infer the nature of the domain object from annotations such as `@Entity` or `@PersistenceCapable` (for JPA or JDO entities), or from `@XmlElement` for JAXB-style view models.
-The purpose of link:https://causeway.apache.org/refguide/2.0.0-SNAPSHOT/applib/index/annotation/DomainObject.html#nature[@DomainObject#nature] is to make the nature explicit.
-
-[TIP]
-.Long URLs
-====
-As you might have noticed, view models are often represented by long URLs.
-This is because their state is encoded into that URL.
+<.> Nevertheless, it's generally good practice to specify the nature explicitly.
 
-If the URL is too long, or if it holds sensitive data that needs to be encrypted, then the link:https://causeway.apache.org/refguide/${CAUSEWAY_VERSION}/applib-svc/UrlEncodingService.html[UrlEncodingService] SPI allows different serializations to be provided.
-====
 
 === How this demo works
 
 There are two collections on the left hand side, one of domain entities and the other of view models.
-The entities are obtained by querying a repository, while the view models are created on the fly, each wrapping a corresponding entity.
+The entities are obtained by querying a repository, while the view models are created on the fly, each wrapping a corresponding entity:
+
+[source,java]
+.DomainObjectNaturePage_viewModels.java
+----
+include::DomainObjectNaturePage_viewModels.java[tags=class]
+----
+<.> creates view model on the fly.
 
 Navigate through to these domain objects to inspect their source code; both the entity and view model explicitly indicates its `nature`.
 
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage.java
index b9e98bf960..5d0ab8c0d2 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage.java
@@ -35,12 +35,11 @@ import org.apache.causeway.applib.annotation.ObjectSupport;
 @XmlType                                                    // <1>
 @XmlAccessorType(XmlAccessType.FIELD)                       // <1>
 @Named("demo.DomainObjectNaturePage")
-@DomainObject(
-        nature=Nature.VIEW_MODEL)                           // <.>
+@DomainObject(nature=Nature.VIEW_MODEL)                     // <.>
 public class DomainObjectNaturePage implements HasAsciiDocDescription {
 
     @ObjectSupport public String title() {
-        return "DomainObject#mixinMethod";
+        return "DomainObject#nature";
     }
 }
 //end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage.layout.xml
index f58c4de051..1786ad30c1 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage.layout.xml
@@ -10,13 +10,14 @@
 	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="https://causeway.apache.org/applib/layout/component https://causeway.apache.org/applib/layout/component/component.xsd   https://causeway.apache.org/applib/layout/grid/bootstrap3 https://causeway.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
         xmlns:bs3="https://causeway.apache.org/applib/layout/grid/bootstrap3"
         xmlns:cpt="https://causeway.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" />
@@ -24,22 +25,22 @@
 	</bs3:row>
 	<bs3:row>
         <bs3:col span="6">
-            <cpt:fieldSet name="Demo" id="general">
-                <cpt:property id="message" labelPosition="TOP"/>
-            </cpt:fieldSet>
-            <cpt:fieldSet name="Referenced Property" id="referencedProprety">
-                <cpt:property id="favoriteChild" labelPosition="TOP"/>
-            </cpt:fieldSet>
 			<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
-			<cpt:collection id="children"/>
+			<cpt:collection id="entities" paged="5"/>
+			<cpt:collection id="viewModels" paged="5"/>
         </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="downloadMetamodelXml"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="rebuildMetamodel" position="PANEL"/>
+				<cpt:action id="downloadLayout"  position="PANEL_DROPDOWN"/>
 				<cpt:action id="inspectMetamodel"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="downloadMetamodelXml"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="downloadJdoMetamodel"  position="PANEL_DROPDOWN"/>
                 <cpt:action id="recentCommands"  position="PANEL_DROPDOWN"/>
+                <cpt:action id="recentExecutions"  position="PANEL_DROPDOWN"/>
+                <cpt:action id="recentAuditTrailEntries"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="impersonateWithRoles"  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/domain/objects/DomainObject/nature/DomainObjectNaturePage_entities.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage_entities.java
index 8bb7f740a8..86c754901e 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage_entities.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage_entities.java
@@ -12,20 +12,16 @@ import org.apache.causeway.applib.annotation.Collection;
 import org.apache.causeway.applib.annotation.CollectionLayout;
 import org.apache.causeway.applib.annotation.DomainObject;
 
-@DomainObject(mixinMethod = "collection")                           // <.>
 @Collection()
-@CollectionLayout()
 @RequiredArgsConstructor
 public class DomainObjectNaturePage_entities {
 
     @SuppressWarnings("unused")
     private final DomainObjectNaturePage mixee;
 
-    public List<? extends DomainObjectNatureEntity> collection() {   // <.>
+    public List<? extends DomainObjectNatureEntity> coll() {
         return objectRepository.all();
     }
 
-    @Inject
-    ValueHolderRepository<String, ? extends DomainObjectNatureEntity> objectRepository;
-
+    @Inject ValueHolderRepository<String, ? extends DomainObjectNatureEntity> objectRepository;
 }
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage_viewModels.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage_viewModels.java
index da3d900482..e8734ea9e2 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage_viewModels.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/DomainObjectNaturePage_viewModels.java
@@ -15,9 +15,7 @@ import org.apache.causeway.applib.annotation.CollectionLayout;
 import org.apache.causeway.applib.annotation.DomainObject;
 
 //tag::class[]
-@DomainObject(mixinMethod = "collection")                           // <.>
 @Collection()
-@CollectionLayout()
 @RequiredArgsConstructor
 public class DomainObjectNaturePage_viewModels {
     // ...
@@ -26,9 +24,9 @@ public class DomainObjectNaturePage_viewModels {
     private final DomainObjectNaturePage mixee;
 
 //tag::class[]
-    public List<DomainObjectNatureViewModel> collection() {   // <.>
+    public List<DomainObjectNatureViewModel> coll() {
         return entities.all().stream()
-                .map(DomainObjectNatureViewModel::new)
+                .map(DomainObjectNatureViewModel::new)  // <.>
                 .collect(Collectors.toList());
     }
 //end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jdo/DomainObjectNatureJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jdo/DomainObjectNatureJdo.java
deleted file mode 100644
index 8d06f9b170..0000000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jdo/DomainObjectNatureJdo.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  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.domain.objects.DomainObject.nature.entity.jdo;
-
-import demoapp.dom.domain.objects.DomainObject.nature.entity.DomainObjectNatureEntity;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
-import javax.inject.Named;
-import javax.jdo.annotations.*;
-
-import org.apache.causeway.applib.annotation.Bounding;
-import org.apache.causeway.applib.annotation.DomainObject;
-import org.apache.causeway.applib.annotation.Nature;
-import org.springframework.context.annotation.Profile;
-
-@Profile("demo-jdo")
-@PersistenceCapable(
-        identityType = IdentityType.DATASTORE,
-        schema = "demo",
-        table = "DomainObjectNatureJdo"
-)
-@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
-@Named("demo.DomainObjectNatureJpa")
-@NoArgsConstructor
-//tag::class[]
-// ...
-@DomainObject(
-        nature = Nature.ENTITY)                     // <.>
-public class DomainObjectNatureJdo
-        extends DomainObjectNatureEntity {
-    // ...
-//end::class[]
-
-    public DomainObjectNatureJdo(final String name) {
-        this.name = name;
-    }
-
-    @Column(allowsNull = "false")
-    @Getter @Setter
-    private String name;
-
-    //tag::class[]
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jdo/DomainObjectNatureJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jdo/DomainObjectNatureJdoEntities.java
deleted file mode 100644
index 235cb2814f..0000000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jdo/DomainObjectNatureJdoEntities.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  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.domain.objects.DomainObject.nature.entity.jdo;
-
-import demoapp.dom._infra.values.ValueHolderRepository;
-
-import org.springframework.context.annotation.Profile;
-import org.springframework.stereotype.Service;
-
-@Profile("demo-jdo")
-@Service
-public class DomainObjectNatureJdoEntities
-extends ValueHolderRepository<String, DomainObjectNatureJdo> {
-
-    protected DomainObjectNatureJdoEntities() {
-        super(DomainObjectNatureJdo.class);
-    }
-
-    @Override
-    protected DomainObjectNatureJdo newDetachedEntity(String value) {
-        return new DomainObjectNatureJdo(value);
-    }
-
-}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jpa/DomainObjectNatureJpa-description.adoc
similarity index 70%
copy from examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel-description.adoc
copy to examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jpa/DomainObjectNatureJpa-description.adoc
index d77f147770..c623857c31 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jpa/DomainObjectNatureJpa-description.adoc
@@ -1,5 +1,13 @@
 :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 [...]
 
-TODO: references to persistent java entities
+This domain class is a simple entity:
+
+[source,java,indent=0]
+.DomainObjectNatureJpa.java
+----
+include::DomainObjectNatureJpa.java[tags=class]
+----
+<.> The framework can infer the nature of the domain class from these annotations
+<.> Nevertheless, it's generally good practice to specify the nature explicitly.
+
 
-@XmlJavaTypeAdapter(PersistentEntityAdapter.class)
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jpa/DomainObjectNatureJpa.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jpa/DomainObjectNatureJpa.java
index 4c3ada1263..0cf1725098 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jpa/DomainObjectNatureJpa.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/entity/jpa/DomainObjectNatureJpa.java
@@ -33,18 +33,16 @@ import org.apache.causeway.persistence.jpa.applib.integration.CausewayEntityList
 import org.springframework.context.annotation.Profile;
 
 @Profile("demo-jpa")
-@Entity
-@Table(
+//tag::class[]
+@Entity                                             // <.>
+@Table(                                             // <1>
     schema = "demo",
     name = "DomainObjectNatureJpa"
 )
 @EntityListeners(CausewayEntityListener.class)
 @Named("demo.DomainObjectNatureJpa")
+@DomainObject(nature = Nature.ENTITY)               // <.>
 @NoArgsConstructor
-//tag::class[]
-// ...
-@DomainObject(
-        nature = Nature.ENTITY)                     // <.>
 public class DomainObjectNatureJpa
         extends DomainObjectNatureEntity {
     // ...
@@ -62,6 +60,6 @@ public class DomainObjectNatureJpa
     @Getter @Setter
     private String name;
 
-    //tag::class[]
+//tag::class[]
 }
 //end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel-description.adoc
index d77f147770..445c12fe4f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel-description.adoc
@@ -1,5 +1,27 @@
 :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 [...]
 
-TODO: references to persistent java entities
+This object is a view model that "wraps" an underlying entity.
+
+[source,java]
+.DomainObjectNatureViewModel.java
+----
+include::DomainObjectNatureViewModel.java[tags=class]
+----
+<.> Specifies this is a JAXB element.
+This is actually enough for the framework to infer that this domain object is a view model.
+<.> Nevertheless, it's generally good practice to specify the nature explicitly.
+<.> Presentation logic that build on the behaviour of the underlying entity.
+<.> Required to reference a persistent entity (or the entity class itself can be so annotated).
+
+In many cases the framework is able to infer the nature of the domain object from annotations such as `@Entity` or `@PersistenceCapable` (for JPA or JDO entities), or from `@XmlElement` for JAXB-style view models.
+The purpose of link:https://causeway.apache.org/refguide/2.0.0-SNAPSHOT/applib/index/annotation/DomainObject.html#nature[@DomainObject#nature] is to make the nature explicit.
+
+[TIP]
+.Long URLs
+====
+As you might have noticed, view models are often represented by long URLs.
+This is because their state is encoded into that URL.
+
+If the URL is too long, or if it holds sensitive data that needs to be encrypted, then the link:https://causeway.apache.org/refguide/${CAUSEWAY_VERSION}/applib-svc/UrlEncodingService.html[UrlEncodingService] SPI allows different serializations to be provided.
+====
 
-@XmlJavaTypeAdapter(PersistentEntityAdapter.class)
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel.java
index 6c7741b0c0..8c57ca87a9 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel.java
@@ -40,14 +40,11 @@ import org.apache.causeway.applib.jaxb.PersistentEntityAdapter;
 import org.apache.causeway.applib.services.title.TitleService;
 
 //tag::class[]
-@XmlRootElement(name = "root")
-@XmlType(
-        propOrder = {"message", "favoriteChild", "children"}
-)
-@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "root")                              // <.>
+@XmlType(propOrder = {"message", "underlying"})             // <1>
+@XmlAccessorType(XmlAccessType.FIELD)                       // <1>
 @Named("demo.StatefulViewModelJaxbRefsEntity")
-@DomainObject(
-        nature=Nature.VIEW_MODEL)
+@DomainObject(nature=Nature.VIEW_MODEL)                     // <.>
 @NoArgsConstructor
 public class DomainObjectNatureViewModel
         implements HasAsciiDocDescription {
@@ -57,8 +54,7 @@ public class DomainObjectNatureViewModel
         this.underlying = underlying;
     }
 
-    @Inject TitleService titleService;
-    @ObjectSupport public String title() {
+    @ObjectSupport public String title() {                  // <.>
         return message != null ? message : titleService.titleOf(underlying);
     }
 
@@ -69,9 +65,10 @@ public class DomainObjectNatureViewModel
 
     @Property
     @Getter @Setter
-    @XmlElement                                             // <.>
-    @XmlJavaTypeAdapter(PersistentEntityAdapter.class)
+    @XmlElement
+    @XmlJavaTypeAdapter(PersistentEntityAdapter.class)      // <.>
     private DomainObjectNatureEntity underlying;
 
+    @Inject @XmlTransient TitleService titleService;
 }
 //end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel.layout.xml
index 6182d7eeb3..d3ad7771fd 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel.layout.xml
@@ -10,40 +10,73 @@
 	OF ANY KIND, either express or implied. See the License for the specific
 	language governing permissions and limitations under the License. -->
 <bs3:grid
-        xmlns:bs3="https://causeway.apache.org/applib/layout/grid/bootstrap3"
-        xmlns:cpt="https://causeway.apache.org/applib/layout/component"
->
+		xsi:schemaLocation="https://causeway.apache.org/applib/layout/component https://causeway.apache.org/applib/layout/component/component.xsd   https://causeway.apache.org/applib/layout/grid/bootstrap3 https://causeway.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
+		xmlns:bs3="https://causeway.apache.org/applib/layout/grid/bootstrap3"
+		xmlns:cpt="https://causeway.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">
-            <cpt:fieldSet name="General" id="general">
-                <cpt:property id="message" labelPosition="TOP"/>
-            </cpt:fieldSet>
-			<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
-			<cpt:collection id="children"/>
-        </bs3:col>
+		<bs3:col span="6">
+			<bs3:tabGroup>
+				<bs3:tab name="General">
+					<bs3:row>
+						<bs3:col span="12">
+							<cpt:fieldSet name="General" id="general" >
+								<cpt:property id="message">
+									<cpt:action id="updateMessage"/>
+								</cpt:property>
+								<cpt:property id="underlying"/>
+							</cpt:fieldSet>
+						</bs3:col>
+					</bs3:row>
+				</bs3:tab>
+				<bs3:tab name="Metadata">
+					<bs3:row>
+						<bs3:col span="12">
+							<cpt:fieldSet name="Metadata" id="metadata" >
+								<cpt:property id="id"/>
+								<cpt:property id="logicalTypeName"/>
+								<cpt:property id="version"/>
+							</cpt:fieldSet>
+						</bs3:col>
+					</bs3:row>
+				</bs3:tab>
+				<bs3:tab name="Other">
+					<bs3:row>
+						<bs3:col span="12">
+							<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
+						</bs3:col>
+					</bs3:row>
+				</bs3:tab>
+			</bs3:tabGroup>
+		</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="downloadLayout"  position="PANEL_DROPDOWN"/>
 				<cpt:action id="inspectMetamodel"  position="PANEL_DROPDOWN"/>
-                <cpt:action id="recentCommands"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="downloadMetamodelXml"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="downloadJdoMetamodel"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="recentCommands"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="recentExecutions"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="recentAuditTrailEntries"  position="PANEL_DROPDOWN"/>
+				<cpt:action id="impersonateWithRoles"  position="PANEL_DROPDOWN"/>
 				<cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
 				<cpt:property id="description"/>
 			</cpt:fieldSet>
-		</bs3:col>
-	</bs3:row>
+		</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/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel_updateMessage.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel_updateMessage.java
new file mode 100644
index 0000000000..243ac5d20b
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/nature/viewmodel/DomainObjectNatureViewModel_updateMessage.java
@@ -0,0 +1,37 @@
+package demoapp.dom.domain.objects.DomainObject.nature.viewmodel;
+
+import demoapp.dom._infra.values.ValueHolderRepository;
+import demoapp.dom.domain.objects.DomainObject.nature.DomainObjectNaturePage;
+import demoapp.dom.domain.objects.DomainObject.nature.entity.DomainObjectNatureEntity;
+import lombok.RequiredArgsConstructor;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.annotation.Nullable;
+import javax.inject.Inject;
+
+import org.apache.causeway.applib.annotation.Action;
+import org.apache.causeway.applib.annotation.Collection;
+import org.apache.causeway.applib.annotation.CollectionLayout;
+import org.apache.causeway.applib.annotation.DomainObject;
+
+//tag::class[]
+@Action()
+@RequiredArgsConstructor
+public class DomainObjectNatureViewModel_updateMessage {
+    // ...
+//end::class[]
+    @SuppressWarnings("unused")
+    private final DomainObjectNatureViewModel mixee;
+
+//tag::class[]
+    public DomainObjectNatureViewModel act(@Nullable String newMessage) {   // <.>
+        mixee.setMessage(newMessage);
+        return mixee;
+    }
+    public String default0Act() {
+        return mixee.getMessage();
+    }
+}
+//end::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 7df2f14b51..c95945ab9b 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
@@ -33,8 +33,7 @@ For latest we use: https://raw.githubusercontent.com/apache/causeway/master/anto
                 <mb3:serviceAction objectType="demo.DomainObjectMenu" id="entityChangePublishing"/>
                 <mb3:serviceAction objectType="demo.DomainObjectMenu" id="introspection"/>
                 <mb3:serviceAction objectType="demo.DomainObjectMenu" id="mixinMethod"/>
-                <mb3:serviceAction objectType="demo.DomainObjectMenu" id="natureStateful"/>
-                <mb3:serviceAction objectType="demo.DomainObjectMenu" id="natureStatefulRefsEntity"/>
+                <mb3:serviceAction objectType="demo.DomainObjectMenu" id="nature"/>
                 <mb3:serviceAction objectType="demo.DomainObjectMenu" id="domainEvents"/>
                 <mb3:serviceAction objectType="demo.DomainObjectMenu" id="lifecycleEvents"/>
             </mb3:section>