[ 
https://issues.apache.org/jira/browse/SLING-6504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16065034#comment-16065034
 ] 

Radu Cotescu commented on SLING-6504:
-------------------------------------

[~fvisser], the patch looks relatively clean to me. Could you please also 
provide some tests, maybe with a POJO that would actually use `adaptable` as an 
argument, to prove that the patch doesn't break backwards compatibility?

> 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
>              Labels: Sightly
>
> 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)

Reply via email to