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

danhaywood pushed a commit to branch CAUSEWAY-3175
in repository https://gitbox.apache.org/repos/asf/causeway-app-helloworld.git

commit b5c6a5d898ac7dd2a533fb836e389c85beef635c
Author: danhaywood <[email protected]>
AuthorDate: Wed Jan 3 23:48:56 2024 +0000

    CAUSEWAY-3175 : confirms still an issue
---
 .../modules/hello/dom/hwo/HelloWorldObject.layout.xml    |  1 +
 .../HelloWorldObject_LookupChildUsingAutoComplete.java   | 16 +++++-----------
 ...ject_LookupChildUsingAutoCompleteWithParameters.java} | 12 ++++++------
 3 files changed, 12 insertions(+), 17 deletions(-)

diff --git 
a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject.layout.xml 
b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject.layout.xml
index 8d5ee66..7827680 100644
--- a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject.layout.xml
+++ b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject.layout.xml
@@ -50,6 +50,7 @@
                             <cpt:collection id = "children">
                                 <cpt:action id = "createChild"/>
                                 <cpt:action id = 
"lookupChildUsingAutoComplete"/>
+                                <cpt:action id = 
"lookupChildUsingAutoCompleteWithParameters"/>
                                 <cpt:action id = "lookupChildUsingChoices"/>
                             </cpt:collection>
                         </bs3:col>
diff --git 
a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoComplete.java
 
b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoComplete.java
index 72d5b3d..8b6eaf1 100644
--- 
a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoComplete.java
+++ 
b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoComplete.java
@@ -23,13 +23,6 @@ public class HelloWorldObject_LookupChildUsingAutoComplete {
        @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
     private final HelloWorldObject target;
 
-       @Value
-    @Accessors(fluent = true)
-       static class Parameters {
-               String objectName;
-               String childName;
-       }
-
        public HelloWorldChild act(
                        @Parameter String objectName,
                        @Parameter String childName) {
@@ -42,7 +35,7 @@ public class HelloWorldObject_LookupChildUsingAutoComplete {
                                .get();
        }
 
-    public Collection<String> 
choicesObjectName(HelloWorldObject_LookupChildUsingChoices.Parameters params) {
+    public Collection<String> choices0Act() {
         return helloWorldObjects
                 .listAll()
                 .stream()
@@ -52,15 +45,16 @@ public class HelloWorldObject_LookupChildUsingAutoComplete {
     }
 
     /**
-     * This method is _not_ picked up.
+     * Is this method picked up ??
      */
-       public Collection<String> autoCompleteChildName(Parameters params,
+       public Collection<String> autoComplete1Act(String objectName,
                        @MinLength(3) String search) {
-        HelloWorldObject helloWorldObject = 
helloWorldObjects.findByName(params.objectName)
+        HelloWorldObject helloWorldObject = 
helloWorldObjects.findByName(objectName)
                 .get(0);
         return List.copyOf(helloWorldObject.getChildren())
                         .stream()
                         .map((o)->o.getName())
+                        .filter(x -> search == null || x.contains(search))
                         .collect(Collectors.toList());
        }
 
diff --git 
a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoComplete.java
 
b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoCompleteWithParameters.java
similarity index 91%
copy from 
src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoComplete.java
copy to 
src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoCompleteWithParameters.java
index 72d5b3d..8e55800 100644
--- 
a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoComplete.java
+++ 
b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObject_LookupChildUsingAutoCompleteWithParameters.java
@@ -1,5 +1,9 @@
 package domainapp.modules.hello.dom.hwo;
 
+import lombok.RequiredArgsConstructor;
+import lombok.Value;
+import lombok.experimental.Accessors;
+
 import java.util.Collection;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -10,15 +14,11 @@ import org.apache.causeway.applib.annotation.Action;
 import org.apache.causeway.applib.annotation.MinLength;
 import org.apache.causeway.applib.annotation.Parameter;
 
-import lombok.RequiredArgsConstructor;
-import lombok.Value;
-import lombok.experimental.Accessors;
-
 
 @SuppressWarnings("CdiManagedBeanInconsistencyInspection")
 @Action
 @RequiredArgsConstructor
-public class HelloWorldObject_LookupChildUsingAutoComplete {
+public class HelloWorldObject_LookupChildUsingAutoCompleteWithParameters {
 
        @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
     private final HelloWorldObject target;
@@ -42,7 +42,7 @@ public class HelloWorldObject_LookupChildUsingAutoComplete {
                                .get();
        }
 
-    public Collection<String> 
choicesObjectName(HelloWorldObject_LookupChildUsingChoices.Parameters params) {
+    public Collection<String> choicesObjectName(Parameters params) {
         return helloWorldObjects
                 .listAll()
                 .stream()

Reply via email to