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 f2d6f1527e ISIS-3328: DefaultHelpVm: cache the markup content
f2d6f1527e is described below

commit f2d6f1527e0a16b080080c11323e080bf0b30af6
Author: Andi Huber <ahu...@apache.org>
AuthorDate: Thu Jan 19 19:51:57 2023 +0100

    ISIS-3328: DefaultHelpVm: cache the markup content
---
 .../causeway/core/runtimeservices/helpui/DefaultHelpVm.java       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/core/runtimeservices/src/main/java/org/apache/causeway/core/runtimeservices/helpui/DefaultHelpVm.java
 
b/core/runtimeservices/src/main/java/org/apache/causeway/core/runtimeservices/helpui/DefaultHelpVm.java
index e53cc1764a..8d96f503be 100644
--- 
a/core/runtimeservices/src/main/java/org/apache/causeway/core/runtimeservices/helpui/DefaultHelpVm.java
+++ 
b/core/runtimeservices/src/main/java/org/apache/causeway/core/runtimeservices/helpui/DefaultHelpVm.java
@@ -32,6 +32,7 @@ import org.apache.causeway.applib.annotation.PropertyLayout;
 import org.apache.causeway.applib.value.Markup;
 import 
org.apache.causeway.core.runtimeservices.CausewayModuleCoreRuntimeServices;
 
+import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 
 @DomainObject(nature = Nature.VIEW_MODEL)
@@ -51,12 +52,11 @@ public class DefaultHelpVm implements ViewModel {
 
     @Property
     @PropertyLayout(labelPosition = LabelPosition.NONE)
-    public Markup getHelpContent() {
-        return new 
Markup(documentationServiceDefault.getDocumentationAsHtml());
-    }
+    @Getter(lazy = true)
+    private final Markup helpContent = new 
Markup(documentationServiceDefault.getDocumentationAsHtml());
 
     @Override
     public String viewModelMemento() {
-        return "DefaultHelpVm";
+        return "DefaultHelpVm"; // arbitrary string (used only to create 
bookmarks)
     }
 }

Reply via email to