Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Sightly Java Use-API | Error while adapting from Resource

Avatar

Level 1

https://docs.adobe.com/docs/en/aem/6-0/develop/sightly/use-api-in-java.html

<div data-sly-use.asset="com.day.cq.dam.api.Asset">
  <p>${asset.mimeType}</p>
</div>

This isn't working for me.

Similarly, I have tried adapting resource to Product

<div data-sly-use.product="com.adobe.cq.commerce.api.Product">
      <p>${product.title}</p>
  </div>

Getting Exception

1 Accepted Solution

Avatar

Correct answer by
Level 10

See this AEM article:  Creating your first Adobe Experience Manager Sightly component

it talks about using Sighty and Java.

Here is more of an in-depth one that uses Sightly, Java, Sling Models and JSOUP API to build a DOM Parser component  - another good community article:

Creating a Sightly and Sling Model DOM parser component

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

See this AEM article:  Creating your first Adobe Experience Manager Sightly component

it talks about using Sighty and Java.

Here is more of an in-depth one that uses Sightly, Java, Sling Models and JSOUP API to build a DOM Parser component  - another good community article:

Creating a Sightly and Sling Model DOM parser component