Adobe
AD0-E128 · Question #32
A developer is using a Sling Model to apply some business logic to the values stored in the JCR before outputting them to the page, and all injected fields are optional for this model. What is the…
The correct answer is A. `defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL'. See the full explanation below for the reasoning.
Develop AEM Sites Components
Question
A developer is using a Sling Model to apply some business logic to the values stored in the JCR before outputting them to the page, and all injected fields are optional for this model. What is the proper way to apply this behavior on the class level?
Options
- A`defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL'
- B`requiredInjectionStrategy = FALSE'
- C`injectionStrategy = InjectionStrategy.OPTIONAL
- D`autoInjectStrategy = Optional'
How the community answered
(52 responses)- A71% (37)
- B6% (3)
- C17% (9)
- D6% (3)
Topics
#Sling Models#DefaultInjectionStrategy#optional injection#model annotations
Community Discussion
No community discussion yet for this question.