* @return whether to clear args or not (they aren't if there was a validation exception)
*/
private boolean executeActionOnTargetAndProcessResults(ObjectAdapter targetAdapter, MarkupContainer feedbackForm) {
// validate the action parameters (if any)
final ActionModel actionModel = getActionModel();
final String invalidReasonIfAny = actionModel.getReasonInvalidIfAny();
if (invalidReasonIfAny != null) {
feedbackForm.error(invalidReasonIfAny);
return false;
}
// the object store could raise an exception (eg uniqueness constraint)
// so we handle it here.
try {
// could be programmatic flushing, so must include in the try... finally
final ObjectAdapter resultAdapter = executeActionHandlingApplicationExceptions();
// flush any queued changes, so concurrency or violation exceptions (if any)
// will be thrown here
getTransactionManager().flushTransaction();
final ResultType resultType = ResultType.determineFor(resultAdapter);
resultType.addResults(this, resultAdapter);
if (actionModel.isBookmarkable()) {
bookmarkPage(actionModel);
}
//return true;
// change in policy: never clear args (need them, even after successful execution, for bulk actions).