Expand my Community achievements bar.

SOLVED

Using QueryBuilder API

Avatar

Level 4

Hi,

Previously I used QueryBuilder API to query JCR content repository . I had written the logic in jsp file itself. Now I want to use sightly . So only html files.

Could you please explain with a small example how to use Query Builder API and display the results using sightly.

 

Thanks in advance.

 

Best Regards,

Vijaya Immadisetty.

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Level 10

The best way to do this is use Java and Sightly. On the Java side, use Query builder API. Then display the results using Sightly.

Here is an article that shows you how to use Java and Sightly:

https://helpx.adobe.com/experience-manager/using/creating-sightly-component.html

Early next week, we will release an article that shows this use case.

Avatar

Level 10

Here is another Sightly article that will help. Although it does not use QueryBuilder, it shows you how to display a result set in Sightly that was generated on the Java side. Very similar to what you want to do. Except  your case,  you are using QueryBuilder API to generate the result set.

https://helpx.adobe.com/experience-manager/using/domparser.html

Avatar

Correct answer by
Level 10

I got Sightly and QueryBuilder working. 

See: Creating an AEM Sightly Component that uses the QueryBuilder API