Hide the delete button

I'm trying to hide the “Delete” button on the view_documents only if the selected custom document have a boolean property to 1.

I'm using the Studio only … I tried to implement a contribution to the extension point “filter” but it does not seem to work.

Here is the condition I'm using in the contribution:

<extension target="org.nuxeo.ecm.platform.actions.ActionService" point="filters">
  <filter id="canDeleteScan">
    <rule grant="false">

Does anyone have an idea ?


0 votes

2 answers



Hi, you can user this xml extension:

<component name=" your component name"> <extension target="org.nuxeo.ecm.platform.actions.ActionService" point="actions"> <action id="CURRENT_SELECTION_TRASH" > <category >CURRENT_SELECTION_LIST</category>


</action> </extension> <extension target="org.nuxeo.ecm.platform.actions.ActionService" <point="filters">

<filter id="iddelete">

        &lt;rule grant=&quot;false&quot;&gt;
        &lt;condition&gt;Your condition&lt;/condition&gt;

</filter> </extension> </component>


Thanks for your help. I made a contribution to the ActionService point in addition of the contribution to the filter point. I think the problem is in the condition I'm using. Maybe I can't access document properties that way (because it's a list of documents?) ?




Yes, if a property of at least one of the selected documents in the list is “false”, I want to hide the “Delete” button for all of the selected documents because this one can't be deleted.


0 votes

Hi, Super, to recover the selected documents in Java, you must follow the following steps:

-Create a new Bean (Controller)

 In your bean, put the following code:

if (navigationContext.getCurrentDocument().isFolder()) {

       return  documentsListsManager.getWorkingList(DocumentsListsManager.CURRENT_DOCUMENT_SELECTION);
             return null;} 

-Put your Xml extension under the OSGI bundle. (MANIFEST.MF)

-If you have an l10 folder, create a .properties file that contains the path of your bean

Do not hesitate if it does not work.


It is possible to do it with the Studio ?

Unfortunately, i'm not authorized to make my own developments in Java…


Hi, you can try this with your client that you used in Backend.

otherwise i don't know if we can do it in studio.


Hello, So if I understand, you want to recover the documents tick in BackEnd and then you have a certain treatment on these documents.

0 votes