Tab enablement : Document path DOES NOT start with...

HI guys !

I've played around with custom tabs and their enablements and I wonder if there is a way to enable a tab only if the document path does not start with a given path.

which is the perfect negation for the existing parameter “Document path starts with”.

Any idea ?

I've try to set an EL expression for the tab enablement such as :

#{not fn:startsWith(currentDocument.ecm.pathAsString, '/default-domain/workspaces/myWorkspace/')}

it doesn't work, I'm not sure about the 'fn:startsWith' call… is there a doc of available function for EL expressions in this context ? and is this a good approach for this problem ?

0 votes

1 answers

1911 views

ANSWER



You can try to put this in the Custom EL Expression field:

#{!currentDocument.getPathAsString().startsWith("/default-domain/workspaces/myWorkspace/")}
1 votes



Works perfectly after adding the # at the beginning of the EL Expression ;) thanks!
11/27/2013

It was there but @aescaffre formatted his answer badly. I edited it.
11/27/2013