ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 14 - AD0-E103 discussion

Report
Export

A developer creates a custom component. The component dialog includes the following two fields:

The component should display the first ‘X’ characters of the text entered in the ‘text’ input where ‘X’ is the number entered in the ‘charLimit’ input. If zero, or no value, is entered in the ‘charLimit’ input then the text should be unaltered. The developer creates the following Sling Model to perform the trancation:

A Null Pointer Exception occurs if NO charLimit values is set in the component dialog.

What should the developer do to resolve this issue?

A.
Replace the defaultValue=”0” attribute of the ‘charLimit’ field in the dialog with min=”0”.
Answers
A.
Replace the defaultValue=”0” attribute of the ‘charLimit’ field in the dialog with min=”0”.
B.
Add the @Default annotation to the ‘chatLimit’ variable in the Sling Model.
Answers
B.
Add the @Default annotation to the ‘chatLimit’ variable in the Sling Model.
C.
Replace the defaultValue=”0” attribute of the charLimit field in the dialog with defaultValue=”{Long}0”.
Answers
C.
Replace the defaultValue=”0” attribute of the charLimit field in the dialog with defaultValue=”{Long}0”.
D.
Change the defaultInjectionStrategy of the Truncation Sling Model to DefaultInjectionStrategy.REQUIRED.
Answers
D.
Change the defaultInjectionStrategy of the Truncation Sling Model to DefaultInjectionStrategy.REQUIRED.
Suggested answer: D
asked 02/10/2024
Narender B
31 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first