Hi all,
as mentioned in the title is it possible to pass a sling model property to a child component dragged in a parsys?
I want to call an intensive method only once in the parent and then pass the result to all child components dragged in the page.
Solved! Go to Solution.
Views
Replies
Total Likes
Do you mean this structure?
component 1 (which contains this intensive computation) |-> parsys |-> sub component 2 (which
In this case it is hardly possible, because the parsys does not do that (at least that I am aware of).
When I was required to do so always in the context of a request, I used the RequestParameters and stored the result of the computation (and made sure that if the expected key was not present the computation was done again and stored in there).
Do you mean this structure?
component 1 (which contains this intensive computation) |-> parsys |-> sub component 2 (which
In this case it is hardly possible, because the parsys does not do that (at least that I am aware of).
When I was required to do so always in the context of a request, I used the RequestParameters and stored the result of the computation (and made sure that if the expected key was not present the computation was done again and stored in there).
Exactly, the same structure.
Maybe I found a solution which consist in setting the result of the computation in an attribute of the SlingHttpServletRequest
request.setAttribute("result", ruleList);
String ruleList = request.getAttribute("result");
I used this approach succesfully.
Views
Likes
Replies