Sling Models: injection strategy for custom injectors | Community
Skip to main content
Oct 4, 2017 12:18 PM UTC
Solved

Sling Models: injection strategy for custom injectors

Hi everyone,

I have encountered some interesting thing in Sling. I have this model, for example ExampleModel.java · GitHub.

I set defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL for this model, and create field marked as @ChildResource. And this field leave required in spite of this.

My question is this bug or feature?)))

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 4, 2017 3:39 PM UTC

For @ChldResource - is the node a child or grandchild node as   discussed here:

Apache Sling :: Sling Models

see under the Collections heading.

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 4, 2017 3:39 PM UTC

For @ChldResource - is the node a child or grandchild node as   discussed here:

Apache Sling :: Sling Models

see under the Collections heading.

Translate