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 2026/06/15 12:49:38 UTC
(causeway-app-simpleapp) branch maintenance-branch created (now 20d9386)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to branch maintenance-branch
in repository https://gitbox.apache.org/repos/asf/causeway-app-simpleapp.git
at 20d9386 hacking around on maintenance-branch
This branch includes the following new commits:
new 841e22f makes enhance-all.sh executable
new 20d9386 hacking around on maintenance-branch
The 2 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.
(causeway-app-simpleapp) 02/02: hacking around on maintenance-branch
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch maintenance-branch
in repository https://gitbox.apache.org/repos/asf/causeway-app-simpleapp.git
commit 20d9386e88c5af17991319181fc8fd8e04bf8a90
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Jun 9 08:48:22 2026 +0100
hacking around on maintenance-branch
---
.run/SimpleApp (replay).run.xml | 10 +++++++++
.run/SimpleApp.run.xml | 10 +++++++++
.../modules/simple/dom/so/SimpleObject.java | 24 +++++++++++++++++++++
.../modules/simple/dom/so/SimpleObject.layout.xml | 6 ++++++
.../simple/dom/so/SimpleObject_moreOthers.java | 25 ++++++++++++++++++++++
.../simple/fixture/SimpleObject_persona.java | 4 +++-
.../main/resources/config/application.properties | 6 ++++++
7 files changed, 84 insertions(+), 1 deletion(-)
diff --git a/.run/SimpleApp (replay).run.xml b/.run/SimpleApp (replay).run.xml
new file mode 100644
index 0000000..eb04a43
--- /dev/null
+++ b/.run/SimpleApp (replay).run.xml
@@ -0,0 +1,10 @@
+<component name="ProjectRunConfigurationManager">
+ <configuration default="false" name="SimpleApp (replay)" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
+ <module name="simpleapp-jdo-webapp" />
+ <option name="SPRING_BOOT_MAIN_CLASS" value="domainapp.webapp.SimpleApp" />
+ <option name="VM_PARAMETERS" value="-Dserver.port=9090 -Dserver.servlet.session.cookie.name=JSESSION_JPA " />
+ <method v="2">
+ <option name="Make" enabled="true" />
+ </method>
+ </configuration>
+</component>
\ No newline at end of file
diff --git a/.run/SimpleApp.run.xml b/.run/SimpleApp.run.xml
new file mode 100644
index 0000000..0f938ec
--- /dev/null
+++ b/.run/SimpleApp.run.xml
@@ -0,0 +1,10 @@
+<component name="ProjectRunConfigurationManager">
+ <configuration default="false" name="SimpleApp" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
+ <module name="simpleapp-jdo-webapp" />
+ <option name="SPRING_BOOT_MAIN_CLASS" value="domainapp.webapp.SimpleApp" />
+ <option name="VM_PARAMETERS" value="-Dserver.port=8080 -Dserver.servlet.session.cookie.name=JSESSION_JDO" />
+ <method v="2">
+ <option name="Make" enabled="true" />
+ </method>
+ </configuration>
+</component>
\ No newline at end of file
diff --git a/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.java b/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.java
index dce64a7..94760e7 100644
--- a/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.java
+++ b/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.java
@@ -3,6 +3,8 @@
import java.time.LocalTime;
import java.time.ZoneOffset;
import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
import javax.inject.Inject;
import javax.inject.Named;
@@ -20,6 +22,10 @@
import javax.jdo.annotations.VersionStrategy;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.apache.causeway.applib.annotation.Collection;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.lang.Nullable;
import org.apache.causeway.applib.annotation.Action;
@@ -95,6 +101,7 @@ public class SimpleObject implements Comparable<SimpleObject>, CalendarEventable
static final String NAMED_QUERY__FIND_BY_NAME_LIKE = "SimpleObject.findByNameLike";
static final String NAMED_QUERY__FIND_BY_NAME_EXACT = "SimpleObject.findByNameExact";
+ @Qualifier("simple.SimpleObjects") @Autowired private SimpleObjects simpleObjects;
public static SimpleObject withName(final String name) {
val simpleObject = new SimpleObject();
@@ -206,7 +213,24 @@ public void delete() {
repositoryService.removeAndFlush(this);
}
+ @Action(semantics = NON_IDEMPOTENT_ARE_YOU_SURE)
+ public String sameAs(SimpleObject simpleObject) {
+ if(simpleObject == this) {
+ return "SAME";
+ } else {
+ return "DIFFERENT";
+ }
+ }
+ @MemberSupport
+ public List<SimpleObject> choices0SameAs() {
+ return simpleObjects.listAll();
+ }
+
+ @Collection
+ public List<SimpleObject> getOthers() {
+ return simpleObjects.listAll().stream().filter(x -> x != this).collect(Collectors.toList());
+ }
private final static Comparator<SimpleObject> comparator =
Comparator.comparing(SimpleObject::getName);
diff --git a/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.layout.xml b/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.layout.xml
index 6a393d4..c40e2f6 100644
--- a/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.layout.xml
+++ b/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject.layout.xml
@@ -41,6 +41,12 @@
<cpt:fieldSet name="Details" id="details"/>
</bs3:col>
</bs3:row>
+ <bs3:row>
+ <bs3:col span="12">
+ <cpt:collection id="others"/>
+ <cpt:collection id="moreOthers"/>
+ </bs3:col>
+ </bs3:row>
</bs3:col>
<bs3:col span="6">
<bs3:row>
diff --git a/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject_moreOthers.java b/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject_moreOthers.java
new file mode 100644
index 0000000..b10dcd7
--- /dev/null
+++ b/module-simple/src/main/java/domainapp/modules/simple/dom/so/SimpleObject_moreOthers.java
@@ -0,0 +1,25 @@
+package domainapp.modules.simple.dom.so;
+
+import lombok.RequiredArgsConstructor;
+
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+
+import org.apache.causeway.applib.annotation.Collection;
+import org.apache.causeway.applib.annotation.MemberSupport;
+
+@Collection
+@RequiredArgsConstructor
+public class SimpleObject_moreOthers {
+
+ private final SimpleObject simpleObject;
+
+ @MemberSupport
+ public java.util.List<SimpleObject> coll() {
+ return simpleObjects.listAll().stream().filter(x -> x != simpleObject).collect(Collectors.toList());
+ }
+
+ @Inject SimpleObjects simpleObjects;
+
+}
diff --git a/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObject_persona.java b/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObject_persona.java
index 493e69e..9ae4a43 100644
--- a/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObject_persona.java
+++ b/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleObject_persona.java
@@ -5,6 +5,8 @@
import javax.inject.Inject;
+import org.apache.causeway.applib.services.wrapper.control.SyncControl;
+
import org.springframework.core.io.ClassPathResource;
import org.apache.causeway.applib.services.clock.ClockService;
@@ -61,7 +63,7 @@ public static class Builder extends BuilderScriptWithResult<SimpleObject> {
@Override
protected SimpleObject buildResult(final ExecutionContext ec) {
- val simpleObject = wrap(simpleObjects).create(persona.name);
+ val simpleObject = wrap(simpleObjects, SyncControl.control().withSkipRules()).create(persona.name);
if (persona.contentFileName != null) {
val bytes = toBytes(persona.contentFileName);
diff --git a/webapp/src/main/resources/config/application.properties b/webapp/src/main/resources/config/application.properties
index 5faee30..7104316 100644
--- a/webapp/src/main/resources/config/application.properties
+++ b/webapp/src/main/resources/config/application.properties
@@ -57,3 +57,9 @@ decorator.datasource.datasource-proxy.count-query=false
#logging.level.org.springframework=DEBUG
#logging.level.graphql=DEBUG
+
+causeway.extensions.command-log.replay-result-mapping.storage-strategy=PERSISTENT
+causeway.extensions.command-log.replay-result-mapping.on-conflict-policy=THROW_EXCEPTION
+causeway.extensions.command-log.recording-support=ENABLED
+
+#causeway.testing.fixtures.initial-script=domainapp.webapp.application.fixture.scenarios.DomainAppDemo
(causeway-app-simpleapp) 01/02: makes enhance-all.sh executable
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch maintenance-branch
in repository https://gitbox.apache.org/repos/asf/causeway-app-simpleapp.git
commit 841e22f854eb0d7c0d5a0d4df34bfc33a7f7a184
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jun 4 10:46:08 2026 +0100
makes enhance-all.sh executable
---
enhance-all.sh | 0
module-simple-tests/pom.xml | 2 +-
module-simple/pom.xml | 2 +-
pom.xml | 6 +++---
webapp-tests/pom.xml | 2 +-
webapp/pom.xml | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/enhance-all.sh b/enhance-all.sh
old mode 100644
new mode 100755
diff --git a/module-simple-tests/pom.xml b/module-simple-tests/pom.xml
index 2edd058..afc8c75 100644
--- a/module-simple-tests/pom.xml
+++ b/module-simple-tests/pom.xml
@@ -7,7 +7,7 @@
<parent>
<artifactId>simpleapp-jdo</artifactId>
<groupId>org.apache.causeway.starters</groupId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.2.0-SNAPSHOT</version>
</parent>
<artifactId>simpleapp-jdo-module-simple-tests</artifactId>
diff --git a/module-simple/pom.xml b/module-simple/pom.xml
index 84f5b02..0c47d05 100644
--- a/module-simple/pom.xml
+++ b/module-simple/pom.xml
@@ -7,7 +7,7 @@
<parent>
<artifactId>simpleapp-jdo</artifactId>
<groupId>org.apache.causeway.starters</groupId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.2.0-SNAPSHOT</version>
</parent>
<artifactId>simpleapp-jdo-module-simple</artifactId>
diff --git a/pom.xml b/pom.xml
index a113845..3545ae7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,13 +6,13 @@
<parent>
<groupId>org.apache.causeway.app</groupId>
<artifactId>causeway-app-starter-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.2.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>simpleapp-jdo</artifactId>
<groupId>org.apache.causeway.starters</groupId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.2.0-SNAPSHOT</version>
<name>SimpleApp (JDO) - Parent</name>
@@ -20,7 +20,7 @@
<properties>
<java.version>11</java.version>
-
+ <revision>2.2.0-SNAPSHOT</revision>
<datasource-proxy-spring-boot-starter.version>1.8.1</datasource-proxy-spring-boot-starter.version>
<maven-timeline.version>1.8</maven-timeline.version>
<sql-formatter.version>2.0.4</sql-formatter.version>
diff --git a/webapp-tests/pom.xml b/webapp-tests/pom.xml
index 10d70e7..7949902 100644
--- a/webapp-tests/pom.xml
+++ b/webapp-tests/pom.xml
@@ -5,7 +5,7 @@
<parent>
<artifactId>simpleapp-jdo</artifactId>
<groupId>org.apache.causeway.starters</groupId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.2.0-SNAPSHOT</version>
</parent>
<artifactId>simpleapp-jdo-webapp-tests</artifactId>
diff --git a/webapp/pom.xml b/webapp/pom.xml
index fca9732..64f45a9 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -5,7 +5,7 @@
<parent>
<artifactId>simpleapp-jdo</artifactId>
<groupId>org.apache.causeway.starters</groupId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.2.0-SNAPSHOT</version>
</parent>
<artifactId>simpleapp-jdo-webapp</artifactId>