@Button(list="crud-bulk-edit",key="update",order=1,type=Button.TYPE_PRIMARY) @RequiresPermissions(permissions=PERMISSION_EDIT) public Resolution bulkUpdate(){
  int updated=0;
  setupForm(Mode.BULK_EDIT);
  disableBlobFields();
  form.readFromRequest(context.getRequest());
  if (form.validate()) {
    for (    String current : selection) {
      loadObject(current.split("/"));
      editSetup(object);
      writeFormToObject();
      if (editValidate(object)) {
        doUpdate(object);
        editPostProcess(object);
        updated++;
      }
    }
    try {
      commitTransaction();
    }
 catch (    Throwable e) {
      String rootCauseMessage=ExceptionUtils.getRootCauseMessage(e);
      logger.warn(rootCauseMessage,e);
      SessionMessages.addErrorMessage(rootCauseMessage);
      return getBulkEditView();
    }
    SessionMessages.addInfoMessage(ElementsThreadLocals.getText("update.of._.objects.successful",updated));
    return getSuccessfulUpdateView();
  }
 else {
    return getBulkEditView();
  }
}

@ Button ( list = "crud-bulk-edit" , key = "update" , order = 1 , type = Button . TYPE_PRIMARY ) @ RequiresPermissions ( permissions = PERMISSION_EDIT ) public Resolution bulkUpdate ( ) { int updated = 0 ; setupForm ( Mode . BULK_EDIT ) ; disableBlobFields ( ) ; form . readFromRequest ( context . getRequest ( ) ) ; if ( form . validate ( ) ) { for ( String current : selection ) { loadObject ( current . split ( "/" ) ) ; editSetup ( object ) ; writeFormToObject ( ) ; if ( editValidate ( object ) ) { doUpdate ( object ) ; editPostProcess ( object ) ; updated ++ ; } } try { commitTransaction ( ) ; } catch ( Throwable e ) { String rootCauseMessage = ExceptionUtils . getRootCauseMessage ( e ) ; logger . warn ( rootCauseMessage , e ) ; SessionMessages . addErrorMessage ( rootCauseMessage ) ; return getBulkEditView ( ) ; } SessionMessages . addInfoMessage ( ElementsThreadLocals . getText ( "update.of._.objects.successful" , updated ) ) ; return getSuccessfulUpdateView ( ) ; } else { return getBulkEditView ( ) ; } }
handles a bulk update operation ( typically invoked by the user submitting a bulk edit form ) . note : doesn ' t handle blobs .
