[ofbiz-framework] branch trunk updated: Improved: Add unique identifier data to portlet context (OFBIZ-12090)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Improved: Add unique identifier data to portlet context (OFBIZ-12090)

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

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 93fb762  Improved: Add unique identifier data to portlet context (OFBIZ-12090)
93fb762 is described below

commit 93fb762071aa200bd0b36a2bb95eb8b3df757b5b
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sat Dec 12 19:35:35 2020 +0100

    Improved: Add unique identifier data to portlet context (OFBIZ-12090)
   
    Add the portalPortletId + portletSeqId to the portlet context. This is useful if
    a unique identifier within the portlet body (the portlet content) is required.
   
    Thanks: Ingo Wolfmayr
---
 .../org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java     | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java
index 0ee322c..810bf44 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java
@@ -1071,6 +1071,8 @@ public class MacroScreenRenderer implements ScreenStringRenderer {
         ModelScreen modelScreen = null;
         if (UtilValidate.isNotEmpty(screenName) && UtilValidate.isNotEmpty(screenLocation)) {
             try {
+                context.put("portalPortletId", portalPortlet.getString("portalPortletId"));
+                context.put("portletSeqId", portalPortlet.getString("portletSeqId"));
                 modelScreen = ScreenFactory.getScreenFromLocation(screenLocation, screenName);
             } catch (IOException | SAXException | ParserConfigurationException e) {
                 String errMsg = "Error rendering portlet ID [" + portalPortletId + "]: " + e.toString();