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

ahuber pushed a commit to branch v3
in repository https://gitbox.apache.org/repos/asf/causeway-app-referenceapp.git


The following commit(s) were added to refs/heads/v3 by this push:
     new a056864  simplified composite value programming model
a056864 is described below

commit a0568643e4f9e6a67c5326faf098d58cad5bef3a
Author: Andi Huber <[email protected]>
AuthorDate: Fri Feb 28 10:19:35 2025 +0100

    simplified composite value programming model
---
 .../customvaluetypes/compositevalues/ComplexNumber_default.java     | 6 ++----
 .../compositevalues/CompositeValueTypePage-description.adoc         | 3 ++-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/compositevalues/ComplexNumber_default.java
 
b/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/compositevalues/ComplexNumber_default.java
index 6b5be25..1eba7d8 100644
--- 
a/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/compositevalues/ComplexNumber_default.java
+++ 
b/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/compositevalues/ComplexNumber_default.java
@@ -3,14 +3,12 @@ package 
demoapp.dom.progmodel.customvaluetypes.compositevalues;
 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.PromptStyle;
-import org.apache.causeway.applib.annotation.SemanticsOf;
 
 import lombok.RequiredArgsConstructor;
 
 //tag::default-mixin[]
-@Action(semantics = SemanticsOf.SAFE)
-@ActionLayout(promptStyle = PromptStyle.INLINE_AS_IF_EDIT)  // <.>
+@Action        // <.>
+@ActionLayout  // <.>
 @RequiredArgsConstructor
 public class ComplexNumber_default {
 
diff --git 
a/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/compositevalues/CompositeValueTypePage-description.adoc
 
b/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/compositevalues/CompositeValueTypePage-description.adoc
index cfa8ab9..1c0f71a 100644
--- 
a/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/compositevalues/CompositeValueTypePage-description.adoc
+++ 
b/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/compositevalues/CompositeValueTypePage-description.adoc
@@ -104,7 +104,8 @@ The name "default" in this context is in effect a reserved 
method name.
 ----
 include::ComplexNumber_default.java[tags=default-mixin]
 ----
-<.> should always specify the `INLINE_AS_IF_EDIT` prompt style, because the 
prompt may be "nested" within an outer action prompt (e.g. the 
`addComplexNumber` action of the page object iself)
+<.> action semantics is always `@Action(semantics = SemanticsOf.SAFE)`, 
regardless of what is actually declared here
+<.> prompt style is always `@ActionLayout(promptStyle = 
PromptStyle.INLINE_AS_IF_EDIT)`, regardless of what is actually declared here, 
because the prompt may be "nested" within an outer action prompt (e.g. the 
`addComplexNumber` action of the page object iself)
 
 Comparing composite value types to scalar value types, you'll notice that a 
composite type doesn't need to define a `Parser` implementation; instead the 
"default" mixin performs an equivalent role.
 

Reply via email to