You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (JIRA)" <ji...@apache.org> on 2017/08/29 09:38:01 UTC

[jira] [Resolved] (SLING-6504) Use-API to support more flexible way to adapt from different objects

     [ https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radu Cotescu resolved SLING-6504.
---------------------------------
    Resolution: Fixed

Applied slightly modified patch in [r1806544|https://svn.apache.org/r1806544].

> Use-API to support more flexible way to adapt from different objects
> --------------------------------------------------------------------
>
>                 Key: SLING-6504
>                 URL: https://issues.apache.org/jira/browse/SLING-6504
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Feike Visser
>            Assignee: Radu Cotescu
>              Labels: Sightly
>             Fix For: Scripting HTL Engine 1.0.38
>
>
> The current implementation of the Use-api accept classes that are adaptable from Request or Resource. 
> This issue is to make this mechanism more flexible, to be able to adapt from different objects.
> Proposal:
> {code}
> <sly data-sly-use.session="${'javax.jcr.Session' @ adaptable = resource.resourceResolver}" />
> ${session.userID}
> {code}
> This avoids the implementations of wrapper classes that only do the adaptation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)