nerdexam
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)
  • A
    71% (37)
  • B
    6% (3)
  • C
    17% (9)
  • D
    6% (3)

Topics

#Sling Models#DefaultInjectionStrategy#optional injection#model annotations

Community Discussion

No community discussion yet for this question.

Full AD0-E128 Practice