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

0 votes

1 answers

1650 views

ANSWER

Well I thought I already tried this syntax… I re-tried, and it's working with '#{currentDocument.dc.title.startsWith(“Prod”)} Thank you!
03/27/2017



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.

1 votes