You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/08/04 10:13:57 UTC
[isis] branch master updated: ISIS-2402: don't let DemoAppJavaFx
depend on Wicket
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
The following commit(s) were added to refs/heads/master by this push:
new 298b014 ISIS-2402: don't let DemoAppJavaFx depend on Wicket
298b014 is described below
commit 298b01420f51d282b5bd138740e6b60c3a57283e
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Aug 4 12:13:38 2020 +0200
ISIS-2402: don't let DemoAppJavaFx depend on Wicket
---
.../jaxbrefentity/StatefulVmJaxbRefsEntity.java | 17 ++++++++------
examples/demo/javafx/pom.xml | 26 ++++++++++++++++++++++
examples/demo/pom.xml | 12 +---------
examples/demo/vaadin/pom.xml | 17 +++++++++++++-
examples/demo/wicket/pom.xml | 17 ++++++++++++++
5 files changed, 70 insertions(+), 19 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/jaxbrefentity/StatefulVmJaxbRefsEntity.java b/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/jaxbrefentity/StatefulVmJaxbRefsEntity.java
index ab0d521..ce521a2 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/jaxbrefentity/StatefulVmJaxbRefsEntity.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/viewmodels/jaxbrefentity/StatefulVmJaxbRefsEntity.java
@@ -20,12 +20,15 @@ package demoapp.dom.viewmodels.jaxbrefentity;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
+import javax.inject.Inject;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import org.apache.isis.applib.annotation.Action;
@@ -36,7 +39,6 @@ import org.apache.isis.applib.annotation.Nature;
import org.apache.isis.applib.annotation.Optionality;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.viewer.wicket.model.common.CommonContextUtils;
import lombok.Getter;
import lombok.Setter;
@@ -56,6 +58,9 @@ import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
)
public class StatefulVmJaxbRefsEntity implements HasAsciiDocDescription {
+ @XmlTransient @Inject
+ private transient ChildJdoEntities childJdoEntities;
+
public String title() {
return String.format("%s; %s children", getMessage(), getChildren().size());
}
@@ -99,14 +104,12 @@ public class StatefulVmJaxbRefsEntity implements HasAsciiDocDescription {
return this;
}
- //XXX shortcut for debugging (wicket only)
+ //XXX shortcut for debugging
@Action(associateWith = "children", associateWithSequence = "2", semantics = SemanticsOf.NON_IDEMPOTENT)
public StatefulVmJaxbRefsEntity addAll() {
- val all = CommonContextUtils
- .getCommonContext()
- .getServiceRegistry()
- .lookupServiceElseFail(ChildJdoEntities.class)
- .all();
+ Objects.requireNonNull(childJdoEntities,
+ "ViewModel must have its injections points resolved, before any actions can be invoked.");
+ val all = childJdoEntities.all();
getChildren().clear();
getChildren().addAll(all);
return this;
diff --git a/examples/demo/javafx/pom.xml b/examples/demo/javafx/pom.xml
index 0e8a91a..5f70406 100644
--- a/examples/demo/javafx/pom.xml
+++ b/examples/demo/javafx/pom.xml
@@ -133,6 +133,32 @@
</dependency>
<!-- EXTENSIONS -->
+
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-asciidoc-metamodel</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-asciidoc-ui</artifactId>
+ <type>pom</type>
+ <scope>import</scope>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-markdown-metamodel</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-markdown-ui</artifactId>
+ <type>pom</type>
+ <scope>import</scope>
+ <version>${project.version}</version>
+ </dependency>
<!-- INTEGRATION TESTING -->
diff --git a/examples/demo/pom.xml b/examples/demo/pom.xml
index eaa2fc9..398e159 100644
--- a/examples/demo/pom.xml
+++ b/examples/demo/pom.xml
@@ -73,29 +73,19 @@
</dependency>
<dependency>
<groupId>org.apache.isis.valuetypes</groupId>
- <artifactId>isis-valuetypes-asciidoc-ui-wkt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.valuetypes</groupId>
<artifactId>isis-valuetypes-asciidoc-persistence-jdo-dn5</artifactId>
</dependency>
-
<dependency>
<groupId>org.apache.isis.valuetypes</groupId>
<artifactId>isis-valuetypes-markdown-metamodel</artifactId>
</dependency>
<dependency>
<groupId>org.apache.isis.valuetypes</groupId>
- <artifactId>isis-valuetypes-markdown-ui-wkt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.valuetypes</groupId>
<artifactId>isis-valuetypes-markdown-persistence-jdo-dn5</artifactId>
</dependency>
-
<dependency>
<groupId>org.apache.isis.valuetypes</groupId>
- <artifactId>isis-valuetypes-sse-ui-wkt</artifactId>
+ <artifactId>isis-valuetypes-sse-applib</artifactId>
</dependency>
<dependency>
<groupId>org.apache.isis.extensions</groupId>
diff --git a/examples/demo/vaadin/pom.xml b/examples/demo/vaadin/pom.xml
index a37cc7c..a69386d 100644
--- a/examples/demo/vaadin/pom.xml
+++ b/examples/demo/vaadin/pom.xml
@@ -118,12 +118,27 @@
<version>${project.version}</version>
</dependency>
- <!-- EXTENSIONS -->
+ <!-- EXTENSIONS VAA -->
<dependency>
<groupId>org.apache.isis.valuetypes</groupId>
<artifactId>isis-valuetypes-asciidoc-ui-vaa</artifactId>
</dependency>
+
+ <!-- EXTENSIONS WKT -->
+
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-asciidoc-ui-wkt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-markdown-ui-wkt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-sse-ui-wkt</artifactId>
+ </dependency>
<!-- OTHER DEPENDENCIES -->
diff --git a/examples/demo/wicket/pom.xml b/examples/demo/wicket/pom.xml
index 599b697..5cddaf3 100644
--- a/examples/demo/wicket/pom.xml
+++ b/examples/demo/wicket/pom.xml
@@ -76,6 +76,23 @@
<type>pom</type>
</dependency>
+ <!-- EXTENSIONS -->
+
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-asciidoc-ui-wkt</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-markdown-ui-wkt</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.valuetypes</groupId>
+ <artifactId>isis-valuetypes-sse-ui-wkt</artifactId>
+ </dependency>
+
<dependency>
<groupId>org.apache.isis.extensions</groupId>
<artifactId>isis-extensions-pdfjs-ui</artifactId>