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 2020/01/21 16:09:31 UTC

[isis] 06/11: ISIS-2264: adds some more config docs. Renames some properties.

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 f4bc54a76bb1a1b6d49d121f1d793cc99acd02d6
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Jan 21 13:34:08 2020 +0000

    ISIS-2264: adds some more config docs.  Renames some properties.
    
    specifically:
    
    * isis.viewer.wicket.breadcrumbs.showChooser -> isis.viewer.wicket.bookmarks.show-drop-down-on-footer
    * isis.viewer.wicket.whereAmI.enabled -> isis.viewer.wicket.breadcrumbs.enabled
    * isis.viewer.wicket.whereAmI.maxParentChainLength -> isis.viewer.wicket.breadcrumbs.max-parent-chain-length
---
 .../modules/mignotes/pages/migrating-to-2.0.0.adoc | 15 ++++++++
 .../apache/isis/core/config/IsisConfiguration.java | 43 +++++++++++++++-------
 .../models/whereami/WhereAmIModelDefault.java      |  4 +-
 .../widgets/breadcrumbs/BreadcrumbPanel.java       |  2 +-
 .../isis/viewer/wicket/ui/pages/PageAbstract.java  |  2 +-
 .../viewer/wicket/ui/pages/entity/EntityPage.java  |  5 +--
 6 files changed, 51 insertions(+), 20 deletions(-)

diff --git a/antora/components/toc/modules/mignotes/pages/migrating-to-2.0.0.adoc b/antora/components/toc/modules/mignotes/pages/migrating-to-2.0.0.adoc
index a2fdc1d..ad449c0 100644
--- a/antora/components/toc/modules/mignotes/pages/migrating-to-2.0.0.adoc
+++ b/antora/components/toc/modules/mignotes/pages/migrating-to-2.0.0.adoc
@@ -581,6 +581,21 @@ standalone-collection.bulk-load
 |isis.core.runtime-services. +
 {nbsp}{nbsp}translation.po.mode
 
+|isis.viewer. +
+{nbsp}{nbsp}wicket.breadcrumbs.showChooser
+|isis.viewer. +
+{nbsp}{nbsp}wicket.bookmarks.show-drop-down-on-footer
+
+|isis.viewer. +
+{nbsp}{nbsp}wicket.whereAmI.enabled
+|isis.viewer. +
+{nbsp}{nbsp}wicket.breadcrumbs.enabled
+
+|isis.viewer. +
+{nbsp}{nbsp}wicket.whereAmI.maxParentChainLength
+|isis.viewer. +
+{nbsp}{nbsp}wicket.breadcrumbs.max-parent-chain-length
+
 |isis.viewers. +
 {nbsp}{nbsp}collectionLayout.defaultView
 |isis.applib.annotation. +
diff --git a/core/config/src/main/java/org/apache/isis/core/config/IsisConfiguration.java b/core/config/src/main/java/org/apache/isis/core/config/IsisConfiguration.java
index fac0ca3..c029d13 100644
--- a/core/config/src/main/java/org/apache/isis/core/config/IsisConfiguration.java
+++ b/core/config/src/main/java/org/apache/isis/core/config/IsisConfiguration.java
@@ -2359,7 +2359,11 @@ public class IsisConfiguration {
                 private String js;
 
                 /**
+                 * Specifies the file name containing the menubars.
                  *
+                 * <p>
+                 *     This is expected to be a local resource.
+                 * </p>
                  */
                 @NotNull @NotEmpty
                 private String menubarsLayoutXml = "menubars.layout.xml";
@@ -2375,8 +2379,11 @@ public class IsisConfiguration {
                 
                 /**
                  * The version of the application, eg 1.0, 1.1, etc.
-                 * If present, then this will be shown in the footer on every page as well as on the 
+                 *
+                 * <p>
+                 * If present, then this will be shown in the footer on every page as well as on the
                  * about page.
+                 * </p>
                  */
                 private String version;
             }
@@ -2384,24 +2391,41 @@ public class IsisConfiguration {
             private final BookmarkedPages bookmarkedPages = new BookmarkedPages();
             @Data
             public static class BookmarkedPages {
+
                 /**
-                 * Determines whether the bookmarks should be available in the header.
+                 * Whether the panel providing linsk to previously visited object should be accessible from the top-left of the header.
                  */
                 private boolean showChooser = true;
 
+                /**
+                 * Specifies the maximum number of bookmarks to show.
+                 *
+                 * <p>
+                 *     These are aged out on an MRU-LRU basis.
+                 * </p>
+                 */
                 private int maxSize = 15;
+
+                /**
+                 * Whether the drop-down list of previously visited objects should be shown in the footer.
+                 */
+                private boolean showDropDownOnFooter = true;
+
             }
 
             private final Breadcrumbs breadcrumbs = new Breadcrumbs();
             @Data
             public static class Breadcrumbs {
                 /**
-                 * Determines whether the breadcrumbs should be available in the footer.
+                 * Whether to enable the 'where am i' feature, in other words the breadcrumbs.
                  */
-                private boolean showChooser = true;
+                private boolean enabled = true;
+                /**
+                 *
+                 */
+                private int maxParentChainLength = 64;
             }
 
-
             /**
              * IntelliJ unfortunately does not provide IDE completion for lists of classes; YMMV.
              *
@@ -2500,14 +2524,7 @@ public class IsisConfiguration {
                  */
                 private String text;
             }
-            
-            
-            private final WhereAmI whereAmI = new WhereAmI();
-            @Data
-            public static class WhereAmI {
-                private boolean enabled = true;
-                private int maxParentChainLength = 64;
-            }
+
         }
     }
 
diff --git a/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/models/whereami/WhereAmIModelDefault.java b/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/models/whereami/WhereAmIModelDefault.java
index d369246..f3f7b3f 100644
--- a/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/models/whereami/WhereAmIModelDefault.java
+++ b/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/models/whereami/WhereAmIModelDefault.java
@@ -42,11 +42,11 @@ class WhereAmIModelDefault implements WhereAmIModel {
     private boolean isWhereAmIEnabled;
     private int maxChainLength;
     
-    public WhereAmIModelDefault(EntityModel startOfChain) {
+    public WhereAmIModelDefault(final EntityModel startOfChain) {
         this.startOfChain = startOfChain;
         this.commonContext = startOfChain.getCommonContext();
 
-        val settings = commonContext.getConfiguration().getViewer().getWicket().getWhereAmI();
+        val settings = commonContext.getConfiguration().getViewer().getWicket().getBreadcrumbs();
         this.isWhereAmIEnabled = settings.isEnabled();
         this.maxChainLength = settings.getMaxParentChainLength();
 
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/breadcrumbs/BreadcrumbPanel.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/breadcrumbs/BreadcrumbPanel.java
index 0a5e391..f9c0b3c 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/breadcrumbs/BreadcrumbPanel.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/breadcrumbs/BreadcrumbPanel.java
@@ -151,7 +151,7 @@ public class BreadcrumbPanel extends PanelAbstract<IModel<Void>> {
     protected void onConfigure() {
         super.onConfigure();
 
-        boolean shouldShow = getConfiguration().getViewer().getWicket().getBreadcrumbs().isShowChooser();
+        boolean shouldShow = getConfiguration().getViewer().getWicket().getBookmarkedPages().isShowDropDownOnFooter();
         setVisible(shouldShow);
     }
 
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
index 65e03c5..13ea847 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
@@ -408,7 +408,7 @@ public abstract class PageAbstract extends WebPageBase implements ActionPromptPr
     }
 
     protected boolean isShowBreadcrumbs() {
-        return getCommonContext().getConfiguration().getViewer().getWicket().getBreadcrumbs().isShowChooser();
+        return getCommonContext().getConfiguration().getViewer().getWicket().getBookmarkedPages().isShowDropDownOnFooter();
     }
 
     protected void bookmarkPageIfShown(final BookmarkableModel<?> model) {
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
index ab29733..c28e0e8 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
@@ -67,7 +67,7 @@ public class EntityPage extends PageAbstract {
 
     /**
      * Called reflectively, in support of {@link BookmarkablePageLink} links. 
-     * Specifically handled by {@link org.apache.isis.viewer.wicket.viewer.IsisWicketApplication_newPageFactory}
+     * Specifically handled by <code>IsisWicketApplication#newPageFactory()</code>
      */
     public static EntityPage bookmarked(
             IsisWebAppCommonContext commonContext, 
@@ -100,8 +100,7 @@ public class EntityPage extends PageAbstract {
     }
 
     /**
-     * Ensure that any {@link ConcurrencyException} that might have occurred already
-     * (eg from an action invocation) is show.
+     * Ensures that any exception that might have occurred already (eg from an action invocation) is shown.
      */
     public EntityPage(
             IsisWebAppCommonContext commonContext,