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


The following commit(s) were added to refs/heads/master by this push:
     new e7cdfec523 CAUSEWAY-2485: reworks @ActionLayout#promptStyle
e7cdfec523 is described below

commit e7cdfec523381821a2695a4dac070fb3a9d8c81e
Author: danhaywood <[email protected]>
AuthorDate: Mon Apr 17 07:26:55 2023 +0100

    CAUSEWAY-2485: reworks @ActionLayout#promptStyle
---
 .../ActionLayoutPromptStylePage-description.adoc   | 53 ++++++++++++++++----
 .../promptStyle/ActionLayoutPromptStylePage.java   | 31 +-----------
 .../ActionLayoutPromptStylePage.layout.xml         | 20 +++-----
 .../ActionLayoutPromptStylePage_layoutDialog.java  | 56 ----------------------
 .../ActionLayoutPromptStylePage_layoutInline.java  | 51 --------------------
 ...LayoutPromptStylePage_layoutInlineAsIfEdit.java | 51 --------------------
 ...outPromptStylePage_updateNamePromptInline.java} | 22 ++++-----
 ...youtPromptStylePage_updateNamePromptModal.java} | 24 +++++-----
 ...utPromptStylePage_updateNamePromptSidebar.java} | 23 +++++----
 ...StylePage_updateNotesPromptInlineAsIfEdit.java} | 21 ++++----
 10 files changed, 94 insertions(+), 258 deletions(-)

diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage-description.adoc
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage-description.adoc
index 5ad916a964..981dce9e6f 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage-description.adoc
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage-description.adoc
@@ -1,34 +1,69 @@
 :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
+Most actions take parameters, and so the framework renders a prompt to allow 
the parameter arguments to be specified.
+The 
link:https://causeway.apache.org/refguide/2.0.0-SNAPSHOT/applib/index/annotation/ActionLayout.html#promptstyle[@ActionLayout#promptStyle]
 element allows the position of this prompt to be specified.
+
+=== How this demo works
+
+This page has two properties, `name` and `notes`.
+The `name` property has three associated (mixin) actions, each of which can be 
used to update it, but demonstrating three of the prompt styles:
 
-[source,java]
-----
-include::ActionLayoutPromptStylePage.java[tags=class]
-----
 
 * `promptStyle` of _inline_:
 +
 [source,java]
 ----
-include::ActionLayoutPromptStylePage_annotatedInline.java[tags=class]
+include::ActionLayoutPromptStylePage_updateNamePromptInline.java[tags=class]
 ----
 
 * `promptStyle` of _sidebar_:
 +
 [source,java]
 ----
-include::ActionLayoutPromptStylePage_annotatedSidebar.java[tags=class]
+include::ActionLayoutPromptStylePage_updateNamePromptSidebar.java[tags=class]
 ----
 
 * `promptStyle` of _modal_:
 +
 [source,java]
 ----
-include::ActionLayoutPromptStylePage_annotatedModal.java[tags=class]
+include::ActionLayoutPromptStylePage_updateNamePromptModal.java[tags=class]
 ----
 
+The `notes` property meanwhile demonstrates the use of the final 
"inline-as-if-edit" prompt style:
+
+* `promptStyle` of _inline-as-if-edit_:
++
 [source,java]
 ----
-include::ActionLayoutPromptStylePage_annotatedInlineAsIfEdit.java[tags=class]
+include::ActionLayoutPromptStylePage_updateNotesPromptInlineAsIfEdit.java[tags=class]
 ----
++
+This means that for the end-user it seems that they are just editing the 
property directly, but in the code the action is invoked.
+
+
+=== Related configuration property
+
+The Wicket viewer allows the default prompt style to be specified using a 
global configuration property:
+
+[source,yaml]
+.application.yml
+----
+causeway:
+  viewer:
+    wicket:
+      dialog-mode: sidebar  # sidebar | modal
+----
+
+Incidentally, there is also a similar configuration property for actions 
invoked from  menu items:
+
+[source,yaml]
+.application.yml
+----
+causeway:
+  viewer:
+    wicket:
+      dialog-mode-for-menu: sidebar  # sidebar | modal
+----
+
+NOTE: For both of these configuration properties, note that the two other 
variants (`inline` and `inline-as-if-edit`) are not available.
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage.java
index 195fe3fd92..ce707ee524 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage.java
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage.java
@@ -26,7 +26,6 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
 import org.apache.causeway.applib.annotation.DomainObject;
-import org.apache.causeway.applib.annotation.Editing;
 import org.apache.causeway.applib.annotation.Nature;
 import org.apache.causeway.applib.annotation.ObjectSupport;
 import org.apache.causeway.applib.annotation.Optionality;
@@ -51,41 +50,15 @@ public class ActionLayoutPromptStylePage implements 
HasAsciiDocDescription {
         return "@ActionLayout#promptStyle";
     }
 
-    @Property(editing = Editing.DISABLED)
-    @PropertyLayout(fieldSetId = "general", sequence = "1")
-    @XmlElement(required = true)
-    @Getter @Setter
-    private String title;
-
-    @Property(optionality = Optionality.OPTIONAL)
-    @PropertyLayout(fieldSetId = "annotated", sequence = "1")
-    @XmlElement(required = false)
-    @Getter @Setter
-    private String readOnlyProperty1;
-
-    @Property(optionality = Optionality.OPTIONAL)
-    @PropertyLayout(
-            describedAs = "has associated action with 
promptStyle=INLINE_AS_IF_EDIT",
-            fieldSetId = "annotated",
-            sequence = "2")
-    @XmlElement(required = false)
-    @Getter @Setter
-    private String readOnlyProperty2;
-
     @Property(optionality = Optionality.OPTIONAL)
-    @PropertyLayout(fieldSetId = "layout", sequence = "1")
     @XmlElement(required = false)
     @Getter @Setter
-    private String readOnlyProperty3;
+    private String name;
 
     @Property(optionality = Optionality.OPTIONAL)
-    @PropertyLayout(
-            describedAs = "has associated action with 
promptStyle=INLINE_AS_IF_EDIT",
-            fieldSetId = "layout",
-            sequence = "2")
     @XmlElement(required = false)
     @Getter @Setter
-    private String readOnlyProperty4;
+    private String notes;
 
 }
 //end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage.layout.xml
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage.layout.xml
index f2b301290e..655bd70db0 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage.layout.xml
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage.layout.xml
@@ -26,20 +26,12 @@
 
        <bs3:row>
                <bs3:col span="6">
-                       <cpt:fieldSet name="Annotated" id="annotated"/>
-                       <cpt:fieldSet name="Layout" id="layout">
-                               <cpt:property id="readOnlyProperty3">
-                                       <cpt:action id="layoutInline" 
promptStyle="INLINE">
-                                               <cpt:named>Inline</cpt:named>
-                                       </cpt:action>
-                                       <cpt:action id="layoutDialog" 
promptStyle="DIALOG">
-                                               <cpt:named>Dialog</cpt:named>
-                                       </cpt:action>
-                               </cpt:property>
-                               <cpt:property id="readOnlyProperty4">
-                                       <cpt:action id="layoutInlineAsIfEdit" 
promptStyle="INLINE_AS_IF_EDIT"/>
-                               </cpt:property>
-                       </cpt:fieldSet>
+                       <cpt:fieldSet name="Identity" id="identity">
+                <cpt:property id="name"/>
+            </cpt:fieldSet>
+                       <cpt:fieldSet name="Details" id="details">
+                <cpt:property id="notes"/>
+            </cpt:fieldSet>
                        <cpt:fieldSet name="Other" id="other" 
unreferencedProperties="true"/>
                </bs3:col>
                <bs3:col span="6">
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_layoutDialog.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_layoutDialog.java
deleted file mode 100644
index dea4ff82a8..0000000000
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_layoutDialog.java
+++ /dev/null
@@ -1,56 +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.actions.ActionLayout.promptStyle;
-
-import org.apache.causeway.applib.annotation.Action;
-import org.apache.causeway.applib.annotation.ActionLayout;
-import org.apache.causeway.applib.annotation.DomainObjectLayout;
-import org.apache.causeway.applib.annotation.MemberSupport;
-import org.apache.causeway.applib.annotation.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Action(
-    semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
-    describedAs =
-        "<cpt:property id=\"...\">" +
-            "<cpt:action id=\"...\" promptStyle = DIALOG/>" +
-        "</cpt:property>",
-    associateWith = "readOnlyProperty3",
-    sequence = "2")
-@RequiredArgsConstructor
-@DomainObjectLayout()
-public class ActionLayoutPromptStylePage_layoutDialog {
-
-    private final ActionLayoutPromptStylePage stringViewModel;
-
-    @MemberSupport public ActionLayoutPromptStylePage act(final String 
newValue) {
-        stringViewModel.setReadOnlyProperty3(newValue);
-        return stringViewModel;
-    }
-    @MemberSupport public String default0Act() {
-        return stringViewModel.getReadOnlyProperty3();
-    }
-
-}
-//end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_layoutInline.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_layoutInline.java
deleted file mode 100644
index 26671e7e1f..0000000000
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_layoutInline.java
+++ /dev/null
@@ -1,51 +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.actions.ActionLayout.promptStyle;
-
-import org.apache.causeway.applib.annotation.Action;
-import org.apache.causeway.applib.annotation.ActionLayout;
-import org.apache.causeway.applib.annotation.MemberSupport;
-import org.apache.causeway.applib.annotation.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Action(
-        semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
-        describedAs = "<cpt:property id=\"...\"><cpt:action id=\"...\" 
promptStyle = INLINE/></cpt:property>",
-        associateWith = "readOnlyProperty3",
-        sequence = "1")
-@RequiredArgsConstructor
-public class ActionLayoutPromptStylePage_layoutInline {
-
-    private final ActionLayoutPromptStylePage stringViewModel;
-
-    @MemberSupport public ActionLayoutPromptStylePage act(final String 
newValue) {
-        stringViewModel.setReadOnlyProperty3(newValue);
-        return stringViewModel;
-    }
-    @MemberSupport public String default0Act() {
-        return stringViewModel.getReadOnlyProperty3();
-    }
-
-}
-//end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_layoutInlineAsIfEdit.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_layoutInlineAsIfEdit.java
deleted file mode 100644
index 550aeea955..0000000000
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_layoutInlineAsIfEdit.java
+++ /dev/null
@@ -1,51 +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.actions.ActionLayout.promptStyle;
-
-import org.apache.causeway.applib.annotation.Action;
-import org.apache.causeway.applib.annotation.ActionLayout;
-import org.apache.causeway.applib.annotation.MemberSupport;
-import org.apache.causeway.applib.annotation.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Action(
-        semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
-        describedAs = "<cpt:property id=\"...\"><cpt:action id=\"...\" 
promptStyle = INLINE_AS_IF_EDIT/></cpt:property>",
-        associateWith = "readOnlyProperty4",
-        sequence = "1")
-@RequiredArgsConstructor
-public class ActionLayoutPromptStylePage_layoutInlineAsIfEdit {
-
-    private final ActionLayoutPromptStylePage stringViewModel;
-
-    @MemberSupport public ActionLayoutPromptStylePage act(final String 
newValue) {
-        stringViewModel.setReadOnlyProperty4(newValue);
-        return stringViewModel;
-    }
-    @MemberSupport public String default0Act() {
-        return stringViewModel.getReadOnlyProperty4();
-    }
-
-}
-//end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedInline.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNamePromptInline.java
similarity index 77%
rename from 
examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedInline.java
rename to 
examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNamePromptInline.java
index 2526abef93..c1afee254e 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedInline.java
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNamePromptInline.java
@@ -28,27 +28,25 @@ import lombok.RequiredArgsConstructor;
 
 
 //tag::class[]
-@Action(
-        semantics = SemanticsOf.IDEMPOTENT
-)
+@Action(semantics = SemanticsOf.IDEMPOTENT)
 @ActionLayout(
         promptStyle = PromptStyle.INLINE,
-        named = "Inline",
-        describedAs = "promptStyle = INLINE",
-        associateWith = "readOnlyProperty1",
+        associateWith = "name",
         sequence = "1")
 @RequiredArgsConstructor
-public class ActionLayoutPromptStylePage_annotatedInline {
-
-    private final ActionLayoutPromptStylePage stringViewModel;
+public class ActionLayoutPromptStylePage_updateNamePromptInline {
+    // ...
+//end::class[]
+    private final ActionLayoutPromptStylePage page;
 
     @MemberSupport public ActionLayoutPromptStylePage act(final String 
newValue) {
-        stringViewModel.setReadOnlyProperty1(newValue);
-        return stringViewModel;
+        page.setName(newValue);
+        return page;
     }
     @MemberSupport public String default0Act() {
-        return stringViewModel.getReadOnlyProperty1();
+        return page.getName();
     }
 
+//tag::class[]
 }
 //end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedModal.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNamePromptModal.java
similarity index 76%
rename from 
examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedModal.java
rename to 
examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNamePromptModal.java
index 2f042801d5..13ad4f5d15 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedModal.java
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNamePromptModal.java
@@ -28,27 +28,25 @@ import lombok.RequiredArgsConstructor;
 
 
 //tag::class[]
-@Action(
-        semantics = SemanticsOf.IDEMPOTENT
-)
+@Action(semantics = SemanticsOf.IDEMPOTENT)
 @ActionLayout(
         promptStyle = PromptStyle.DIALOG_MODAL,
-        named = "Modal",
-        describedAs = "promptStyle = MODAL",
-        associateWith = "readOnlyProperty1",
-        sequence = "2")
+        associateWith = "name",
+        sequence = "3")
 @RequiredArgsConstructor
-public class ActionLayoutPromptStylePage_annotatedModal {
-
-    private final ActionLayoutPromptStylePage stringViewModel;
+public class ActionLayoutPromptStylePage_updateNamePromptModal {
+    // ...
+//end::class[]
+    private final ActionLayoutPromptStylePage page;
 
     @MemberSupport public ActionLayoutPromptStylePage act(final String 
newValue) {
-        stringViewModel.setReadOnlyProperty1(newValue);
-        return stringViewModel;
+        page.setName(newValue);
+        return page;
     }
     @MemberSupport public String default0Act() {
-        return stringViewModel.getReadOnlyProperty1();
+        return page.getName();
     }
 
+//tag::class[]
 }
 //end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedSidebar.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNamePromptSidebar.java
similarity index 75%
rename from 
examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedSidebar.java
rename to 
examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNamePromptSidebar.java
index a0d4f798c5..7784b23081 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedSidebar.java
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNamePromptSidebar.java
@@ -28,27 +28,26 @@ import lombok.RequiredArgsConstructor;
 
 
 //tag::class[]
-@Action(
-        semantics = SemanticsOf.IDEMPOTENT
-)
+@Action(semantics = SemanticsOf.IDEMPOTENT)
 @ActionLayout(
         promptStyle = PromptStyle.DIALOG_SIDEBAR,
-        named = "sidebar",
-        describedAs = "promptStyle = DIALOG_SIDEBAR",
-        associateWith = "readOnlyProperty1",
-        sequence = "3")
+        associateWith = "name",
+        sequence = "2")
 @RequiredArgsConstructor
-public class ActionLayoutPromptStylePage_annotatedSidebar {
+public class ActionLayoutPromptStylePage_updateNamePromptSidebar {
+    // ...
+//end::class[]
 
-    private final ActionLayoutPromptStylePage stringViewModel;
+    private final ActionLayoutPromptStylePage page;
 
     @MemberSupport public ActionLayoutPromptStylePage act(final String 
newValue) {
-        stringViewModel.setReadOnlyProperty1(newValue);
-        return stringViewModel;
+        page.setName(newValue);
+        return page;
     }
     @MemberSupport public String default0Act() {
-        return stringViewModel.getReadOnlyProperty1();
+        return page.getName();
     }
 
+//tag::class[]
 }
 //end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedInlineAsIfEdit.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNotesPromptInlineAsIfEdit.java
similarity index 76%
rename from 
examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedInlineAsIfEdit.java
rename to 
examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNotesPromptInlineAsIfEdit.java
index 96942bb28e..7b14ce283c 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_annotatedInlineAsIfEdit.java
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/promptStyle/ActionLayoutPromptStylePage_updateNotesPromptInlineAsIfEdit.java
@@ -28,27 +28,26 @@ import lombok.RequiredArgsConstructor;
 
 
 //tag::class[]
-@Action(
-        semantics = SemanticsOf.IDEMPOTENT
-        )
+@Action(semantics = SemanticsOf.IDEMPOTENT)
 @ActionLayout(
         promptStyle = PromptStyle.INLINE_AS_IF_EDIT,
-        named = "Inline as if edit",
-        describedAs = "promptStyle = INLINE_AS_IF_EDIT",
-        associateWith = "readOnlyProperty2",
+        associateWith = "notes",
         sequence = "1")
 @RequiredArgsConstructor
-public class ActionLayoutPromptStylePage_annotatedInlineAsIfEdit {
+public class ActionLayoutPromptStylePage_updateNotesPromptInlineAsIfEdit {
+    // ...
+//end::class[]
 
-    private final ActionLayoutPromptStylePage stringViewModel;
+    private final ActionLayoutPromptStylePage page;
 
     @MemberSupport public ActionLayoutPromptStylePage act(final String 
newValue) {
-        stringViewModel.setReadOnlyProperty2(newValue);
-        return stringViewModel;
+        page.setNotes(newValue);
+        return page;
     }
     @MemberSupport public String default0Act() {
-        return stringViewModel.getReadOnlyProperty2();
+        return page.getNotes();
     }
 
+//tag::class[]
 }
 //end::class[]

Reply via email to