[ https://issues.apache.org/jira/browse/SLING-5739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15293362#comment-15293362 ]
Georg Henzler commented on SLING-5739: -------------------------------------- I think the use case from this ticket already works using the "child-resources" injector (both for injecting plain resources or the corresponding model): {code} @Inject @Source("child-resources") // or @ChildResource @Named("path/to/resource") private Resource plainResource; @Inject @Source("child-resources") // or @ChildResource @Named("path/to/resource") private MyModel resourceAdaptedToMyModel; {code} [~justinedelson] Are there other scenarios for @Via providers that would make sense? Otherwise this is maybe just introducing unnecessary complexity... > [Sling Models] Allow for extensible @Via providers > -------------------------------------------------- > > Key: SLING-5739 > URL: https://issues.apache.org/jira/browse/SLING-5739 > Project: Sling > Issue Type: New Feature > Components: Extensions > Reporter: Justin Edelson > > Currently, @Via support in Sling Models is limited to JavaBean properties. It > would be useful to be able to extend this and allow for downstream projects > to add new @Via providers. > Proposing to support this by extending the @Via annotation > {code} > @Via(value = "jcr:content", type = ChildResource.class) > {code} > The default type is BeanProperty (the current behavior). > New providers can be added by implementing a ViaProvider SPI and provide a > marker class for use in the annotation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)