Hi guys!
I have a component whose rendering comes from a JSP script. In Sightly I show the component placeholder with this code:
<sly data-sly-test="${wcmmode.edit}">
<div data-emptytext="Click here to edit this component" class="cq-placeholder"></div>
</sly>
How do I get the same for JSP?
Thanks advance for the help me
Solved! Go to Solution.
Views
Replies
Total Likes
I have solved it. For anyone who comes across the same problem, this is the solution:
<cq:text escapeXml="true" placeholder="<%= Placeholder.getDefaultPlaceholder(slingRequest, "Click here to edit component", null)%>"/>
Views
Replies
Total Likes
If you are using HTL - you should keep using it as that is best practice - JSP is no longer considered best practice for AEM development
Views
Replies
Total Likes
Ok, but I'm using JSP for this component, not HTL. Is there a way to do it in JSP?
Thanks for reply
Views
Replies
Total Likes
I have solved it. For anyone who comes across the same problem, this is the solution:
<cq:text escapeXml="true" placeholder="<%= Placeholder.getDefaultPlaceholder(slingRequest, "Click here to edit component", null)%>"/>
Views
Replies
Total Likes
That is great - however the use of JSP is NOT best practice. So ppl following this pattern are following a bad practice. Adobe strongly recommends HTL over JSP!
Views
Replies
Total Likes
I'm learning to use AEM. I wanted to understand how it works. What I'm doing isn't a true webpage.
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies