You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/12/12 17:56:44 UTC

[isis] branch master updated (960ac5c -> bc37df1)

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

danhaywood pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git.


    from 960ac5c  ISIS-2177: equals and hashCode for Can ... fixes build
     new ccea01f  ISIS-2225: removes metadata, adds comment instead.
     new dbdf174  ISIS-2225: tweaks to the CSS for credits
     new bc37df1  ISIS-2201: adds thymeleaf, and adds an example templates/error.html.  SB will use this automatically (see BasicErrorController).

The 3 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.


Summary of changes:
 .../org/apache/isis/config/IsisConfiguration.java  | 15 ++++++---
 .../additional-spring-configuration-metadata.json  | 39 ----------------------
 .../viewer/wicket/ui/pages/bootstrap-overrides.css |  3 ++
 core/webapp/pom.xml                                |  5 +++
 examples/demo/src/main/resources/application.yml   |  9 +++--
 .../demo/src/main/resources/static/css/page.css    | 39 ++++++++++++++++------
 examples/demo/src/main/resources/static/index.html | 30 +----------------
 .../demo/src/main/resources/templates/error.html   | 20 +++++++++++
 8 files changed, 73 insertions(+), 87 deletions(-)
 copy core/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/icontitle/EntityIconTitleAndCopyLinkPanel.html => examples/demo/src/main/resources/static/css/page.css (64%)
 create mode 100644 examples/demo/src/main/resources/templates/error.html


[isis] 02/03: ISIS-2225: tweaks to the CSS for credits

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit dbdf174c5639012dcab5e55ec413af6de8deb8a8
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Dec 12 15:21:15 2019 +0000

    ISIS-2225: tweaks to the CSS for credits
---
 .../org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css     | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css b/core/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
index c671df9..5c6fcf3 100644
--- a/core/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
+++ b/core/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
@@ -449,6 +449,7 @@ span.containedButtonPanel {
 
 
 .navbar .powered-by {
+    margin-top: 23px;
     margin-right: 10px;
     font-size: small;
     font-style: italic;
@@ -456,6 +457,8 @@ span.containedButtonPanel {
 }
 
 .navbar .creditName {
+    padding-left: 2px;
+    padding-right: 10px;
     vertical-align: middle;
 }
 


[isis] 01/03: ISIS-2225: removes metadata, adds comment instead.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit ccea01fd4d1174cc8eb3090822a987f22104b1a5
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Dec 12 15:20:59 2019 +0000

    ISIS-2225: removes metadata, adds comment instead.
    
    Also uses list format for demo.
---
 .../org/apache/isis/config/IsisConfiguration.java  | 15 ++++++---
 .../additional-spring-configuration-metadata.json  | 39 ----------------------
 examples/demo/src/main/resources/application.yml   |  9 +++--
 3 files changed, 15 insertions(+), 48 deletions(-)

diff --git a/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java b/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java
index 98495e8..ee10966 100644
--- a/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java
+++ b/core/config/src/main/java/org/apache/isis/config/IsisConfiguration.java
@@ -907,10 +907,17 @@ public class IsisConfiguration {
                  */
                 private boolean showChooser = true;
             }
-            
-            
-            //TODO no meta data yet ... https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html#configuration-metadata-property-attributes 
-            private List<Credit> credit = _Lists.newArrayList();
+
+
+            /**
+             * IntelliJ unfortunately does not provide IDE completion for lists of classes; YMMV.
+             *
+             * For further discussion, see for example this stackoverflow question:
+             * https://stackoverflow.com/questions/41417933/spring-configuration-properties-metadata-json-for-nested-list-of-objects
+             * and this wiki page: https://github.com/spring-projects/spring-boot/wiki/IDE-binding-features#simple-pojo and
+             * 
+             */
+            private List<Credit> credit = new ArrayList<>();
             
             @Data
             public static class Credit {
diff --git a/core/config/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/core/config/src/main/resources/META-INF/additional-spring-configuration-metadata.json
index 5237e2d..20dc25c 100644
--- a/core/config/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ b/core/config/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -66,45 +66,6 @@
     },
     {
       "name": "isis.persistor.datanucleus.impl.javax.jdo.PersistenceManagerFactoryClass"
-    },
-    {
-      "name": "isis.viewer.wicket.credit.url[0]",
-      "type": "java.net.URL"
-    },
-    {
-      "name": "isis.viewer.wicket.credit[0].name",
-      "type": "java.lang.String"
-    },
-    {
-      "name": "isis.viewer.wicket.credit[0].image",
-      "type": "java.lang.String",
-      "description": "Path of image, relative to webapp root."
-    },
-    {
-      "name": "isis.viewer.wicket.credit.url[1]",
-      "type": "java.net.URL"
-    },
-    {
-      "name": "isis.viewer.wicket.credit[1].name",
-      "type": "java.lang.String"
-    },
-    {
-      "name": "isis.viewer.wicket.credit[1].image",
-      "type": "java.lang.String",
-      "description": "Path of image, relative to webapp root."
-    },
-    {
-      "name": "isis.viewer.wicket.credit.url[2]",
-      "type": "java.net.URL"
-    },
-    {
-      "name": "isis.viewer.wicket.credit[2].name",
-      "type": "java.lang.String"
-    },
-    {
-      "name": "isis.viewer.wicket.credit[2].image",
-      "type": "java.lang.String",
-      "description": "Path of image, relative to webapp root."
     }
   ],
   "hints": [
diff --git a/examples/demo/src/main/resources/application.yml b/examples/demo/src/main/resources/application.yml
index 7a422a7..584b7c1 100644
--- a/examples/demo/src/main/resources/application.yml
+++ b/examples/demo/src/main/resources/application.yml
@@ -58,11 +58,10 @@ isis:
         js: scripts/application.js
         about: Apache Isis Hello World
 
-
-      credit[0]:
-        image: /images/apache-isis/logo-48x48.png
-        name: Apache Isis
-        url: http://isis.apache.org
+      credit:
+        - url:  http://isis.apache.org
+          image: /images/apache-isis/logo-48x48.png
+          name: Apache Isis
 
       themes:
         initial: bootstrap-theme


[isis] 03/03: ISIS-2201: adds thymeleaf, and adds an example templates/error.html. SB will use this automatically (see BasicErrorController).

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit bc37df1f677ddf4cfc2b3f9f96d0e243a2c60dbc
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Dec 12 17:21:20 2019 +0000

    ISIS-2201: adds thymeleaf, and adds an example templates/error.html.  SB will use this automatically (see BasicErrorController).
    
    also factors out page.css from index.html, for common look-n-feel.
---
 core/webapp/pom.xml                                |  5 +++
 .../demo/src/main/resources/static/css/page.css    | 45 ++++++++++++++++++++++
 examples/demo/src/main/resources/static/index.html | 30 +--------------
 .../demo/src/main/resources/templates/error.html   | 20 ++++++++++
 4 files changed, 71 insertions(+), 29 deletions(-)

diff --git a/core/webapp/pom.xml b/core/webapp/pom.xml
index a3505ba..e630adb 100644
--- a/core/webapp/pom.xml
+++ b/core/webapp/pom.xml
@@ -74,6 +74,11 @@
             <artifactId>spring-boot-actuator</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-thymeleaf</artifactId>
+        </dependency>
+
         <!-- TESTING -->
 
 		<dependency>
diff --git a/examples/demo/src/main/resources/static/css/page.css b/examples/demo/src/main/resources/static/css/page.css
new file mode 100644
index 0000000..77c24b7
--- /dev/null
+++ b/examples/demo/src/main/resources/static/css/page.css
@@ -0,0 +1,45 @@
+/*
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+ */
+body {
+    background-color: #1A467B;
+    font-family: Verdana, Helvetica, Arial, serif;
+    font-size: 90%;
+}
+
+li {
+    margin-top: 6px;
+    margin-bottom: 6px;
+}
+table {
+    border-collapse: collapse;
+}
+table, th, td {
+    border: 1px;
+    border-style: solid;
+    border-color: lightgray;
+}
+th, td {
+    padding: 10px;
+}
+#wrapper {
+    background-color: #ffffff;
+    width: 900px;
+    margin: 8px auto;
+    padding: 12px;
+}
diff --git a/examples/demo/src/main/resources/static/index.html b/examples/demo/src/main/resources/static/index.html
index e0a7d9f..248d3a4 100644
--- a/examples/demo/src/main/resources/static/index.html
+++ b/examples/demo/src/main/resources/static/index.html
@@ -21,36 +21,8 @@
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
         <title>Apache Isis&trade; v2 Demo</title>
-        
-        <style type="text/css">
-body {
-    background-color: #1A467B;
-    font-family: Verdana, Helvetica, Arial, serif;
-    font-size: 90%;
-}
 
-li {
-    margin-top: 6px;
-    margin-bottom: 6px;
-}
-table {
-    border-collapse: collapse;
-}
-table, th, td {
-    border: 1px;
-    border-style: solid;
-    border-color: lightgray;
-}
-th, td {
-    padding: 10px;
-}
-#wrapper {
-    background-color: #ffffff;
-    width: 900px;
-    margin: 8px auto;
-    padding: 12px;
-}
-        </style>
+        <link rel="stylesheet" type="text/css" href="css/page.css">
     </head>
     <body>
         <div id="wrapper">
diff --git a/examples/demo/src/main/resources/templates/error.html b/examples/demo/src/main/resources/templates/error.html
new file mode 100644
index 0000000..d60df7c
--- /dev/null
+++ b/examples/demo/src/main/resources/templates/error.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html xmlns:th="http://www.thymeleaf.org">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+        <title>Apache Isis&trade; HelloWorld</title>
+
+        <link rel="stylesheet" type="text/css" th:href="@{/css/page.css}">
+    </head>
+    <body>
+        <div id="wrapper">
+            <img alt="Isis Logo" th:src="@{/images/apache-isis/logo.png}" />
+             
+            <p>
+                Our apologies - an error occurred.
+            </p>
+
+            <p>You can access the app <a th:href="@{/wicket/}">here</a>
+        </div>
+    </body>
+</html>