Adobe
AD0-E128 · Question #33
Review the following HTL code snippet: <div data-sly-use.testComponent="${'com.adobe.core.models.TestComponent' @ testParam='testValue'}"></div> Which approach correctly read the value of testParam…
The correct answer is A. @RequestAttribute(name = "testParam"). See the full explanation below for the reasoning.
Develop AEM Sites Components
Question
Review the following HTL code snippet: <div data-sly-use.testComponent="${'com.adobe.core.models.TestComponent' @ testParam='testValue'}"></div> Which approach correctly read the value of testParam in Sling model?
Options
- A@RequestAttribute(name = "testParam")
- B@Inject @Prop("testParam")
- C@Inject(name = "testParam")
- D@ModelAttribute(name = "testParam")
How the community answered
(24 responses)- A75% (18)
- B4% (1)
- C8% (2)
- D13% (3)
Topics
#HTL data-sly-use#Sling Models#@RequestAttribute#parameter passing
Community Discussion
No community discussion yet for this question.