Free AD0-E123 Exam Braindumps (page: 6)

Page 5 of 13

A developer needs to use AEM Core Components in production mode (without sample content). The developer would like to do this without needing to download and install the core components before using them.
Which AEM version would the developer use?

  1. Version 6.3
  2. Adobe Managed Services
  3. AEM as a Cloud Service

Answer(s): C

Explanation:

AEM as a Cloud Service includes the latest AEM features out-of-the-box, including AEM Core Components, which are production-ready without the need for additional downloads or installations of sample content. This version of AEM has a continuous delivery model, ensuring that the most up- to-date features and components are readily available. Option A, Version 6.3, is incorrect because this version would require the manual download and installation of core components.
Option B, Adobe Managed Services, is not a version of AEM, but rather a hosting option that could include various versions of AEM.



A developer wants to render Hello World' only in edit mode.
Which approach would be used?

  1. <p data-sly-test='${wcm. edit}" >Hello World</p>
  2. <p data-sly-test=*${wcmmode.edit}'>Hello World</p>
  3. <p data-sly-test='${wcmmode editor}'>Hello World</p>

Answer(s): B

Explanation:

In AEM, the Sightly/HTL scripting language is used to develop robust and secure components. To render content conditionally based on the WCM (Web Content Management) mode, the wcmmode object is used. The correct property to check if the current mode is edit is wcmmode.edit. The HTL syntax for testing a condition is data-sly-test followed by the condition in ${}. The option B correctly uses this syntax to test if the WCM mode is edit, and if so, renders "Hello World". Option A uses wcm.edit which is not the correct object property. Option C uses wcmmode editor which is not the correct property and the syntax has a typo (should be data-sly-test).



A content author has this OSGI component:



How can the content author use the Apache Felix Web OSGi console to disable the servlet?

  1. Select the Bundle Resource Provider tab > Check that the OSGi component is listed > Click disable Action button
  2. Select the Services tab > Check that the OSGi component is listed > Click disable Action button
  3. Select the Components tab > Check that the OSGi component is listed > Click disable Action button

Answer(s): C

Explanation:

In the Apache Felix Web Console, which is the OSGi management console of AEM, components are managed under the "Components" tab. The provided OSGi component, a servlet in this case, can be disabled by navigating to the "Components" tab, where all the active components are listed. Once the specific servlet is located, it can be disabled by clicking on the "Disable" action button associated with that component. This does not remove the servlet from the system; it simply stops it from being active.
Option A is incorrect because the "Bundle Resource Provider" tab does not deal with enabling or disabling of components.
Option B is also incorrect because the "Services" tab provides information about services but does not provide a direct way to disable them.



Review the following HTL code snippet:
<div data-sly-
use.testComponent='${com.adobe.core.models.TestComponent'@ testParam='testValue'}'></div>
Which two approaches correctly read the value of testParam in Sling model? (Choose two.)

  1. @lnject @Sourcef'request-aItribuIes") @Named{"testParam')
  2. @RequestAttribute(name = "leslParam")
  3. @lnject(name = 'testParam')
  4. @lnjecT @Prop("testParam")

Answer(s): B,C

Explanation:

In Sling Models, annotations are used to map request parameters, attributes, and properties to fields in Java classes.
When an HTL script passes parameters to a Sling Model, the Sling Model can use annotations to access these parameters.
Option B uses the @RequestAttribute annotation which allows the Sling Model to retrieve an attribute that has been set on the Sling HTTP request object. This is a valid approach to read the 'testParam' if it has been set as a request attribute. Option C uses the @Inject annotation with the name attribute specifying the name of the parameter to inject. This is another valid approach to read the 'testParam' from the request. Option A is incorrect because @Named is not the correct annotation for retrieving request attributes or parameters.

Option D is incorrect because there is no @Prop annotation in Sling Models; it's likely confused with the @Property annotation which is not the correct one for this context either.






Post your Comments and Discuss Adobe AD0-E123 exam with other Community members:

AD0-E123 Discussions & Posts