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

Stefan Seifert commented on SLING-3949:
---------------------------------------

this should already work (although i have not tested it with your example).
but via is not a property of custom injector annotations like @Self - you have 
to add an explicit @Via annotation.

can you give it a try and close the ticket if it solves your improvement wish?

> Sling Models: Add via support to Self annotation
> ------------------------------------------------
>
>                 Key: SLING-3949
>                 URL: https://issues.apache.org/jira/browse/SLING-3949
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Jason E Bailey
>            Priority: Minor
>              Labels: models
>
> Allows the object that is to be applied or adapted to come from a property of 
> the given adaptable.
> example:
> {code}
> @Model(adaptables = SlingHttpServletRequest.class)
> public class Foo {
>       @Self(via = "resourceResolver")
>       TagManager tagManager;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to