You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2025/11/19 10:20:05 UTC

(causeway) branch CAUSEWAY-3891 created (now 538c8c9e4d2)

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

danhaywood pushed a change to branch CAUSEWAY-3891
in repository https://gitbox.apache.org/repos/asf/causeway.git


      at 538c8c9e4d2 CAUSEWAY-3891: backports fix from main

This branch includes the following new commits:

     new 538c8c9e4d2 CAUSEWAY-3891: backports fix from main

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



(causeway) 01/01: CAUSEWAY-3891: backports fix from main

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

danhaywood pushed a commit to branch CAUSEWAY-3891
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 538c8c9e4d2b72c3c20fd0550a49d0f74eb7b3c3
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Nov 19 10:19:58 2025 +0000

    CAUSEWAY-3891: backports fix from main
---
 .../pdfjs/wkt/ui/components/PdfJsViewerPanel.java           | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/extensions/vw/pdfjs/wicket/ui/src/main/java/org/apache/causeway/extensions/pdfjs/wkt/ui/components/PdfJsViewerPanel.java b/extensions/vw/pdfjs/wicket/ui/src/main/java/org/apache/causeway/extensions/pdfjs/wkt/ui/components/PdfJsViewerPanel.java
index 167f10c0d1f..27c86dbaac0 100644
--- a/extensions/vw/pdfjs/wicket/ui/src/main/java/org/apache/causeway/extensions/pdfjs/wkt/ui/components/PdfJsViewerPanel.java
+++ b/extensions/vw/pdfjs/wicket/ui/src/main/java/org/apache/causeway/extensions/pdfjs/wkt/ui/components/PdfJsViewerPanel.java
@@ -182,17 +182,20 @@ protected MarkupContainer createRegularFrame() {
             return createShallowRegularFrame();
         }
 
-        val scalarModel = scalarModel();
+        val attributeModel = scalarModel();
 
         val regularFrame = new WebMarkupContainer(ID_SCALAR_IF_REGULAR);
 
+        var documentUrl = urlFor(
+                new ListenerRequestHandler(
+                        new PageAndComponentProvider(getPage(), this)))
+                // adds a hash to the URL, such that browser caching works as desired
+                + "&md5=" + blob.md5Hex();
         val pdfJsConfig =
-                scalarModel.getMetaModel().lookupFacet(PdfJsViewerFacet.class)
+                attributeModel.getMetaModel().lookupFacet(PdfJsViewerFacet.class)
                 .map(pdfJsViewerFacet->pdfJsViewerFacet.configFor(buildKey()))
                 .orElseGet(PdfJsConfig::new)
-                .withDocumentUrl(urlFor(
-                        new ListenerRequestHandler(
-                                new PageAndComponentProvider(getPage(), this))));
+                .withDocumentUrl(documentUrl);
 
         val pdfJsPanel = new PdfJsPanel(ID_SCALAR_VALUE, pdfJsConfig);