Monday 29 April 2019

How to access session in the Sling Model

The session can be easily accessed in the sling model by using the Sling Object annotation. Below code helps us achieve it.

@SlingObject
private ResourceResolver resourceResolver

resourceResolver.adaptTo(Session.class)

No comments:

Post a Comment

extraClientlibs Usage

The purpose of property "extraClientlibs" is to selectively load client library for a dialog. This prevents the unnecessary load o...