Hi team,
I have a requirement where in we should not load the launch based on the <xxx> = true parameter value.
we are loading launch as below :
Solved! Go to Solution.
Views
Replies
Total Likes
Below implementation working for me as expected.
Sling Model:
@Model(adaptables = {Resource.class, SlingHttpServletRequest.class})
public class DemoModel {
@SlingObject
SlingHttpServletRequest request;
private String launchEnabled = "false";
public String getLaunchEnabled() {
if (request.getParameter("launchDisabled") == null || request.getParameter("launchDisabled").equalsIgnoreCase("false"))
launchEnabled = "true";
return launchEnabled;
}
}
HTL:
<div data-sly-use.demo="com.blogspot.adapttoaem.core.models.DemoModel">
<sly data-sly-test="${demo.launchEnabled == 'true'}">
<p>Launch Enabled</p>
</sly>
</div>