Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The action is responsible for informing the user about the result, i.e. whether it has successfully processed all the items, or failed on some of them. It is also responsible for the potential "transactional" processing, i.e. reverting all the items to the initial state, if the processing of one or more items fails. The recommended behaviour for most actions is "non-transactional" plus notifying the user about how many and which items couldn't be processed. The base support for this recommended behaviour will be implemented in new AbstractMultiItemAction class.

If the action supports multiple items, it must provide a constructor with a List<Item> parameter, but still MUST provide also the constructor with the Item parameter. The ActionExecutor will use the proper constructor (via the ComponentProvider) depending on the number of items selected.

 

As an example (and a best-practices model), the DeleteItemAction will be made multi-item supporting.

...