You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2019/08/12 16:24:17 UTC

[sling-org-apache-sling-scripting-bundle-tracker] branch master updated: trivial: added properties to the bindings provided by the script context

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

radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-bundle-tracker.git


The following commit(s) were added to refs/heads/master by this push:
     new 89ca612  trivial: added properties to the bindings provided by the script context
89ca612 is described below

commit 89ca612688c86e1f2238663e7dc1f65352f39a59
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Mon Aug 12 18:24:09 2019 +0200

    trivial: added properties to the bindings provided by the script context
---
 .../sling/scripting/bundle/tracker/internal/ScriptContextProvider.java   | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/ScriptContextProvider.java b/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/ScriptContextProvider.java
index c896768..a488598 100644
--- a/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/ScriptContextProvider.java
+++ b/src/main/java/org/apache/sling/scripting/bundle/tracker/internal/ScriptContextProvider.java
@@ -74,6 +74,7 @@ public class ScriptContextProvider {
             throws IOException {
         // prepare the SlingBindings
         Bindings bindings = new SimpleBindings();
+        bindings.put("properties", request.getResource().getValueMap());
         bindings.put(SlingBindings.REQUEST, request);
         bindings.put(SlingBindings.RESPONSE, response);
         bindings.put(SlingBindings.READER, request.getReader());