You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "David Nuescheler (JIRA)" <ji...@apache.org> on 2008/06/05 16:29:45 UTC

[jira] Created: (SLING-514) expose currentSession

expose currentSession
---------------------

                 Key: SLING-514
                 URL: https://issues.apache.org/jira/browse/SLING-514
             Project: Sling
          Issue Type: New Feature
          Components: Scripting
            Reporter: David Nuescheler
            Priority: Minor


i think it would be great to expose a currentSession variable in scripting similar to the currentNode.
in a usecase that i ran to recently i needed access to the session and tried to go through currentNode.getSession() which didn't work because my currentNode did not really exist since it was a synthetic resource that i requested.
of course one can go through the request.getResourceResolver().adaptTo(Packages.javax.jcr.Session) to acquire the session but i think a short-hand would be nice since this is a very common case

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-514) expose currentSession

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-514:
------------------------------------

          Component/s:     (was: Scripting)
                       Scripting JavaScript (Rhino)
    Affects Version/s: Scripting JavaScript 2.0.2

> expose currentSession
> ---------------------
>
>                 Key: SLING-514
>                 URL: https://issues.apache.org/jira/browse/SLING-514
>             Project: Sling
>          Issue Type: New Feature
>          Components: Scripting JavaScript (Rhino)
>    Affects Versions: Scripting JavaScript 2.0.2
>            Reporter: David Nuescheler
>            Priority: Minor
>
> i think it would be great to expose a currentSession variable in scripting similar to the currentNode.
> in a usecase that i ran to recently i needed access to the session and tried to go through currentNode.getSession() which didn't work because my currentNode did not really exist since it was a synthetic resource that i requested.
> of course one can go through the request.getResourceResolver().adaptTo(Packages.javax.jcr.Session) to acquire the session but i think a short-hand would be nice since this is a very common case

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.