Addons

HOWTO: Customize the Bulk Edit Form - JSF UI

Updated: September 26, 2024

JSF UI Deprecation
This requires to have the JSF UI addon installed on your server that is deprecated since Nuxeo Platform LTS 2019.
Please refer to the Web UI documentation.

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

  1. In Studio, go to Listings & Views > Form Layouts and click on New.
  2. Fill in the Feature ID: bulkEdit and click on Next.

    Make sure that your form layout is named bulkEdit to override the default one.

  3. Go to the Edit Layout tab.
  4. Drag and drop the widgets you need.
  5. In the Advanced Configuration part, attach 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.

  6. Click on Save.

Deploying Changes on Your Nuxeo Platform Instance

  1. Go to your Nuxeo Platform instance.
  2. Connect as Administrator with Administrator password.
  3. Click on Admin Center > Update Center > Nuxeo Studio.
  4. Click on the Update button.
  5. Go to 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']

  1. Drag and drop a generic widget from the right to the grid.
  2. Fill in the creation form.
  3. In the Edit Properties, select Yes for the Can Select New Tag field.
  4. 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'].

  1. Drag and drop a generic widget from the right to the grid.
  2. Fill in the creation form.
  3. Fill in the Edit properties:

    Document page provider name default_document_suggestion
    Selection Formatter formatSelectedCollection
    Suggestion Formatter formatSuggestedCollection
  4. In the Custom properties part fill in the following fields:

    restoreSeamCtx false
    operationId Collection.Suggestion
  5. 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 is to create 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>