Hi
How can i access global Java-backed Objects mentioned in https://docs.adobe.com/docs/en/htl/docs/global-objects.html in a Java class that extends WCMUsePojo.
Thank you
Views
Replies
Total Likes
You can directly invoke these method in the class which extends WCMUsePojo.
Check this documentation https://docs.adobe.com/docs/en/htl/docs/use-api/java.html
Views
Replies
Total Likes
Here a link to the javadoc: https://docs.adobe.com/docs/en/aem/6-1/ref/javadoc/com/adobe/cq/sightly/WCMUsePojo.html
You have methods getProperties(), getCurrentPage() etc..
Views
Replies
Total Likes
am looking to retrieve java-backed objects mentioned in https://docs.adobe.com/docs/en/htl/docs/global-objects.html . getProperties(), getCurrentPage() methods are available as part of WCMUseOPojo. looking to retrieve other objects (mentioned with variable names in the documentation) like componentContext, log, out, reader, resource etc
Views
Replies
Total Likes
They should be already there, otherwise you can use the following:
ComponentContext context = get("componentContext", ComponentContext.class);
Views
Replies
Total Likes
am looking to retrieve java-backed objects mentioned in https://docs.adobe.com/docs/en/htl/docs/global-objects.html . getProperties(), getCurrentPage() methods are available as part of WCMUseOPojo. looking to retrieve other objects (mentioned with variable names in the documentation) like componentContext, log, out, reader, resource etc
Views
Replies
Total Likes
If you want access to those Global objects - you do not need to use Java - you can access directly from HTML.
https://docs.adobe.com/docs/en/htl/docs/global-objects.html
Hope this helps.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies