11-27-2013 10:52 AM
Hi guys!
I would like to apply an XML Extension only for a particular path.
Let's say I want to remote the notification tab in the administration panel for each folders inside : /default-domain/worspaces/myWorkspace/aSpecialFolder/
So I'm using this Extension :
<extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions">
<action id="TAB_MANAGE_SUBSCRIPTIONS" enabled="false"/>
</extension>
But it removes the subscription tab for any folder in my nuxeo instance. How can I use it only on a particular path ? ( a "path start with" condition would be perfect )
EDIT :
/>
as guillaume suggested, I've tried to add a filter node in my action so I can enable it according to the current document path like this :
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
point="actions">
<action id="TAB_MANAGE_SUBSCRIPTIONS" >
<filter id="TAB_MANAGE_SUBSCRIPTIONS">
<rule grant="true">
<condition>#{!currentDocument.getPathAsString().startsWith("/default-domain/worspaces/myWorkspace/aSpecialFolder/")}</condition>
</rule>
</filter>
</action>
</extension>
But it doesn't seem to work, I'll keep testing but just in case, can you see where I did wrong ?
11-27-2013 10:58 AM
Please read about action and filters on User Actions (Links, Buttons, Icons, Tabs). Check the Managing Filters to Control an Action Visibility section.
11-27-2013 10:58 AM
Please read about action and filters on User Actions (Links, Buttons, Icons, Tabs). Check the Managing Filters to Control an Action Visibility section.
11-27-2013 11:08 AM
Ok seems it, I'll add a filter with an EL Expression condition... thanx
11-27-2013 11:27 AM
I've updated my question with my last try to apply filter on my action
11-27-2013 11:44 AM
Ok it works now with :
<extension target="org.nuxeo.ecm.platform.actions.ActionService"
point="actions">
<action id="TAB_MANAGE_SUBSCRIPTIONS" >
<filter id="TAB_MANAGE_SUBSCRIPTIONS">
<rule grant="false">
<condition>#{currentDocument.getPathAsString().startsWith("/default-domain/worspaces/myWorkspace/aSpecialFolder/")}</condition>
</rule>
</filter>
</action>
</extension>
I guess there was no sens to enable it only outside of a folder since its enabled by default so I Disabled it inside of the target folder and it works fine !
thanks for your help!
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.