Shubham Gupta’s Post

View profile for Shubham Gupta, graphic

AEM developer | Software Engineer at EY | React Developer

Answer this AEM question 💡

  • No alternative text description for this image

It depends on your use case. If your business logic only requires you to deal with the current resouce, then Resource.class makes sense. But if you want to use some request attributes, request values in your sling model. As well as for sling model exporter where the call does not goes to component html, and it is entirely based on mapping of your resourceType and sling model. In this case SlingHttpRequest.class is beneficial and required.

Battu SravanKumar

Certified AEM Sites Developer

3w

If the model deals with content prefer RESOURCE class , if request specific logic is required then use SlinghttpServletrequest. Clarity of use is required when including both in the model

Like
Reply
Pradeep Kumar Reddy C

Adobe Certified Master | Technical Lead | Senior AEM Developer

3w
Like
Reply
See more comments

To view or add a comment, sign in

Explore topics