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

commit fda7a766c0fbf8e04c9fe9f3366761a5907a1ac9
Author: andi-huber <[email protected]>
AuthorDate: Sat Sep 17 21:47:41 2022 +0200

    ISIS-3215: demo domain fixes
---
 .../depargs/DependentArgsActionDemo_useAutoComplete.java          | 8 ++++++++
 .../progmodel/depargs/DependentArgsActionDemo_useChoices.java     | 7 +++++++
 2 files changed, 15 insertions(+)

diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/progmodel/depargs/DependentArgsActionDemo_useAutoComplete.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/progmodel/depargs/DependentArgsActionDemo_useAutoComplete.java
index 36d08beafb..ab71f7391b 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/progmodel/depargs/DependentArgsActionDemo_useAutoComplete.java
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/progmodel/depargs/DependentArgsActionDemo_useAutoComplete.java
@@ -76,6 +76,14 @@ public class DependentArgsActionDemo_useAutoComplete {
 
     // -- PARAM 1 (DemoItem)
 
+    @MemberSupport public DemoItem default1Act(final Parameters params) {
+        // fill in first that is possible based on the first param from the UI 
dialog
+        return params.parity()==null
+                ? null
+                : autoComplete1Act(params, params.parity.name())
+                    .stream().findFirst().orElse(null);
+    }
+
     @MemberSupport public Collection<DemoItem> autoComplete1Act(
             final Parameters params,
             @MinLength(2) final String search) {
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/progmodel/depargs/DependentArgsActionDemo_useChoices.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/progmodel/depargs/DependentArgsActionDemo_useChoices.java
index e5403fa9ef..9bd56acdc3 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/progmodel/depargs/DependentArgsActionDemo_useChoices.java
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/progmodel/depargs/DependentArgsActionDemo_useChoices.java
@@ -76,6 +76,13 @@ public class DependentArgsActionDemo_useChoices {
 
     // -- PARAM 1 (DemoItem)
 
+    @MemberSupport public DemoItem default1Act(final Parameters params) {
+        // fill in first that is possible based on the first param from the UI 
dialog
+        return params.parity()==null
+                ? null
+                : choices1Act(params).stream().findFirst().orElse(null);
+    }
+
     @MemberSupport public Collection<DemoItem> choices1Act(final Parameters 
params) {
 
         val parity = params.parity(); // <-- the refining parameter from the 
dialog above

Reply via email to