Load a WCMUsePojo class inside of a JSP template
Hi,
I'm currently rewriting a Sightly template as JSP (I usually prefer using Sightly, but I need JSP for this use case).
In our Sightly template, we are loading in a model class that inherits from WCMUsePojo:
<sly data-sly-use.search="edu.nyu.aemnyu.core.components.content.news.Search" data-sly-unwrap>
When I try mimicking this in the JSP template:
Search search = resource.adaptTo(Search.class);
The "activate()" method doesn't seem to get invoked, which tells me I'm doing something wrong.
Am I missing a better way to handle this in JSP? I'm hoping to avoid re-writing the Search class referenced above since its used elsewhere.
Thank you in advance,
Scott