Using JSTL functions in custom EL for Tab Activation
Hello,
I am trying to set my tab activation so that it appears only for product having a specific field starting by a specific string.
For example, I would like the tab to appear only when the dc:title starts with “Prod”, here is what I tried:
'#{fn:startsWith(currentDocument.dc.title, “Prod”}
when I try it, i get on my server logs: “function fn:startsWith not found”
Would have any idea of how I could achieve this ?
Thanks for your answers
Hi,
Functions are not supported in this context, see https://jira.nuxeo.com/browse/NXP-13680. As a workaround, for your example, the following should work ok (not tested):
'#{currentDocument.dc.title.startsWith(“Prod”)}
As an alternative, or if your logics are too complex, you can define a Seam component in a custom bundle and call the corresponding methods, as Seam components are available in this context.