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 2022/08/18 13:21:33 UTC

[isis] branch master updated: ISIS-3124: just docs

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 4ccc397503 ISIS-3124: just docs
4ccc397503 is described below

commit 4ccc397503e3fb9925767a61af2128e16d144a2c
Author: andi-huber <ah...@apache.org>
AuthorDate: Thu Aug 18 15:21:25 2022 +0200

    ISIS-3124: just docs
---
 .../relnotes/modules/ROOT/pages/2022/2.0.0-M8/mignotes.adoc      | 6 ++++++
 .../applib/services/placeholder/PlaceholderRenderService.java    | 9 +++++++++
 .../placeholder/PlaceholderRenderServiceDefault.java             | 9 +++++----
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/antora/components/relnotes/modules/ROOT/pages/2022/2.0.0-M8/mignotes.adoc b/antora/components/relnotes/modules/ROOT/pages/2022/2.0.0-M8/mignotes.adoc
index e4ec2d7f1c..77f779f376 100644
--- a/antora/components/relnotes/modules/ROOT/pages/2022/2.0.0-M8/mignotes.adoc
+++ b/antora/components/relnotes/modules/ROOT/pages/2022/2.0.0-M8/mignotes.adoc
@@ -104,6 +104,12 @@ The following changed:
 
 == Other
 
+=== Placeholder Rendering (UI) 
+
+The UI now renders placeholders `(none)` when representing `null` references. 
+To customize behavior you may want to implement your own `PlaceholderRenderService`. 
+(See `PlaceholderRenderServiceDefault`, the default implementation.)  
+
 === Bill of Material / Parent POM
 
 Folder moved `/isis-parent` -> `/bom` 
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/placeholder/PlaceholderRenderService.java b/api/applib/src/main/java/org/apache/isis/applib/services/placeholder/PlaceholderRenderService.java
index aa48dfc652..c791d62988 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/placeholder/PlaceholderRenderService.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/placeholder/PlaceholderRenderService.java
@@ -37,7 +37,16 @@ public interface PlaceholderRenderService {
         private final String literal;
     }
 
+    /**
+     * Textual representation of given {@link PlaceholderLiteral},
+     * as used for eg. titles and choice drop-downs.
+     */
     String asText(@NonNull PlaceholderLiteral placeholderLiteral);
+
+    /**
+     * Html representation of given {@link PlaceholderLiteral},
+     * as used for rendering with the UI (when appropriate).
+     */
     String asHtml(@NonNull PlaceholderLiteral placeholderLiteral);
 
     static PlaceholderRenderService fallback() {
diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/placeholder/PlaceholderRenderServiceDefault.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/placeholder/PlaceholderRenderServiceDefault.java
index 8b02590ab9..18aaa23b03 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/placeholder/PlaceholderRenderServiceDefault.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/placeholder/PlaceholderRenderServiceDefault.java
@@ -35,10 +35,11 @@ import lombok.NonNull;
 import lombok.val;
 
 /**
-*
-* @since 2.0
-*
-*/
+ * Default implementation of {@link PlaceholderRenderService},
+ * that (HTML) renders <i>Bootstrap</i> styled placeholder badges.
+ *
+ * @since 2.0
+ */
 @Service
 @Named(IsisModuleCoreRuntimeServices.NAMESPACE + ".PlaceholderRenderServiceDefault")
 @Priority(PriorityPrecedence.MIDPOINT)