What is the alternative for the data-sly-use attribute in JSP. Is there any other way to call use api scripts from a .jsp file?
Solved! Go to Solution.
Views
Replies
Total Likes
@PremIB As per my knowledge you need to write the whole logic into the JSP file itself and inside the scriptlet tags.
ex.
<%
String propertyName = properties.get("propertyName", String.class);
%>
P.S. It better to use Sightly /HTL based component over JSP based component.
@PremIB As per my knowledge you need to write the whole logic into the JSP file itself and inside the scriptlet tags.
ex.
<%
String propertyName = properties.get("propertyName", String.class);
%>
P.S. It better to use Sightly /HTL based component over JSP based component.
@Suraj_KamdiI am trying to overlay the richtext widget from /libs/cq/gui/components/authoring/dialog/richtext/render.jsp in /apps then call a javascript use api script from that jsp file. Here, I do not have an option to use HTL to directly call the script with data-sly-use, because i am not sure about changing the jsp script to HTL. if you can refer me to an updated HTL version of the RichText widget, that would be enough for me. Also, I cannot move my javascript use api script's logic to jsp either, it is already referenced by multiple HTL files.
Views
Replies
Total Likes
@PremIBIf you are working on the touch ui component then visit to https://experience-aem.blogspot.com/2021/03/aem-cloud-service-css-and-color-picker-plugin-rte-rich-t...
This will give you some idea
Views
Replies
Total Likes
Hi,
What is the use case here? Please see https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/calling-custom-utility-met... if that is useful.
Ideally if you have backend implementation already as a Model try to use HTL. Keep the backend implementation logic in service components so that if you have to use jsp, it can be called within jsp.
Another way (may be not ideal) use a .html file to use the data-sly-use attribute. Use or include this HTL file within the ultimate jsp where you are looking to use the data-sly-use attribute