I am trying to add multiple selectors while using data-sly-resource. Code used ::
<div data-sly-resource="${currentPage.path @selectors=['form', 's1', 's2']}"></div>
It throws ClassCastException
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.lang.String
Its working fine with single selector :: <div data-sly-resource="${currentPage.path @selectors='form'}"></div>
Solved! Go to Solution.
Views
Replies
Total Likes
Have you tried
<div data-sly-resource="${currentPage.path @selectors='form.s1.s2'}"></div>
??
/Ove
Views
Replies
Total Likes
Have you tried
<div data-sly-resource="${currentPage.path @selectors='form.s1.s2'}"></div>
??
/Ove
Views
Replies
Total Likes
This works but I need a combination of static and dynamic values.
Views
Replies
Total Likes
Not sure if it matters, but the documentation shows a space between the '@' and the word 'selectors':
http://docs.adobe.com/content/docs/en/aem/6-0/develop/sightly.html
Views
Replies
Total Likes
Space is not an issue. Tried it.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies