I'm converting a JSP into sightly for a component. In that component they are setting an object as a request attribute to be used in another component. We cannot set request attributes in sightly right? So I'm trying to send this object as a parameter to a sling model/wcmusepojo to set the request attribute there but I think we can only pass string values as arguments to slingmodels/wcmusepojo right? Is there any example of passing an object as a parameter to slingmodel/wcmusepojo? Thanks!
You can not set request attribute from sightly but you can get it.
And also you can not pass a pure java object except String and some other like that so if you need any backend operation like setting request object you need to do it java only before it comes to the sightly.
if you still need to pass the parameter, you can do ti like that: