コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Sling Models: injection strategy for custom injectors

Avatar

以前のコミュニティメンバー

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?)))

1 受け入れられたソリューション

Avatar

正解者
Level 10

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

Apache Sling :: Sling Models

see under the Collections heading.

元の投稿で解決策を見る

1 返信

Avatar

正解者
Level 10

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

Apache Sling :: Sling Models

see under the Collections heading.