[
https://issues.apache.org/jira/browse/SLING-7122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16164725#comment-16164725
]
Justin Edelson commented on SLING-7122:
---------------------------------------
@ChildResource should work for non-immediate children, although there could be
limitations of certain ResourceProviders. But the contract for
{{Resource.getChild()}} says
bq. Returns the child at the given relative path of this resource or {{null}}
if no such child exists.
> Sling Models: @Path and @ResourcePath should allow relative paths
> -----------------------------------------------------------------
>
> Key: SLING-7122
> URL: https://issues.apache.org/jira/browse/SLING-7122
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: Sling Models API 1.3.6
> Reporter: Hans-Peter Stoerr
> Priority: Minor
>
> It would be nice if the ResourcePathInjector could not only allow injecting
> resources with absolute paths, but also with relative paths. For example if
> I'm constructing a model from a Resource /some/resource , I currently don't
> see a way to inject the subresource, say, jcr:content/config . @ChildResource
> can be used to inject immediate children, but not descendants.
> It would be easy to distinguish between absolute and relative paths: if it
> starts with / it is an absolute path, otherwise relative.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)