Hi,
I need to convert my jsp page to HTL(Sightly).
In Jsp we use ,
<jsp:useBean id="aa" scope="page"
class="com.aaa.bbb.cq.ccc.dd.MyJavaClass" />
<jsp:setProperty name="aa" property="slingRequest"
value="${slingRequest}" />
Where it will call the java class named 'MyJavaClass' on page load.
In HTL(Sighlty) how we can implement this on page load,can anyone guide me ?
Thanks,
Nandhini
Solved! Go to Solution.
You can use data-sly-use to use Java-classes.
Views
Replies
Total Likes
You can use data-sly-use to use Java-classes.
Views
Replies
Total Likes
In addition to feike_visser, you can check the documentation and spec:
Best Regards
Diego
Views
Replies
Total Likes
You can create a model for your component and fetch the properties in the Sling Model if you need to manipulate with those.
A sample to help you Creating a site footer in AEM 6 using Sightly and Sling Models | 6D Labs
Views
Likes
Replies
Views
Likes
Replies