The bulk edit screen offers a form that allows to edit several documents at the same time. This is implemented using the BulkEditService component. You can customize it with Studio by creating a form layout named bulkEdit
. The "Edit" layout will be used on the bulk edit popup. The default bulk edit layout can be found on GitHub or in the Explorer.
Creating a Form Layout in Studio
- In Studio, go to Listings & Views > Form Layouts and click on New,
Fill in the Feature ID:
bulkEdit
and click on Next,Make sure that your form layout is named
bulkEdit
to override the default one.- Go to the Edit Layout tab,
- Drag and drop the widgets you need,
In the Advanced Configuration part, join the
layout_bulkedit_template.xhtml
which is in the folder$NUXEO/nxserver/nuxeo.war/layouts
,See the GitHub documentation about the layout bulk edit template.
- Click on Save.
Deploying Changes on Your Nuxeo Platform Instance
- Go to your Nuxeo Platform instance.
- Connect as Administrator with Administrator password.
- Click on Admin Center > Update Center > Nuxeo Studio.
- Click on the Update button.
- Go in a workspace and edit your documents.
Specific cases
When you want to create a bulk edit form with the possibility to edit the collections and the tags, you need a particular configuration.
Tags
When you configure a widget to select tags, the field that needs to be referenced is contextData['request/bulk_tags']
- Drag and drop a generic widget from the right to the grid,
- Fill in the creation form,
- In the Edit Properties, select Yes for the Can Select New Tag field,
- Click on Save and deploy your changes on your instance.
Collections
When configuring a widget to select collections, the field that needs to be referenced is contextData['request/bulk_collections']
.
- Drag and drop a generic widget from the right to the grid,
- Fill in the creation form,
Fill in the Edit properties:
Document page provider namedefault_document_suggestion
Selection Formatter formatSelectedCollection
Suggestion Formatter formatSuggestedCollection
In the Custom Properties fill in the following fields:
restoreSeamCtx false operationId Collection.Suggestion - Click on Save and deploy your changes on your instance.
You should end up with something like this:
Customizing the Bulk Edit Versioning Policy
When users edit several documents at the same time using the bulk edit form, a new version of the documents is saved before applying the modifications. The default versioning policy consists in creating a minor version.
This versioning policy can be configured through the versioning extension point:
<extension target="org.nuxeo.ecm.webapp.bulkedit.BulkEditService"
point="versioning">
<versioning>
<defaultVersioningOption>MINOR</defaultVersioningOption>
</versioning>
</extension>
JSF and Ajax Tips and How-To Index Layout and Widgets (Forms, Listings, Grids)