Merged V3.1 to HEAD

13426: Support for fix to ETHREEOH-1157: Allow dialogs to propagate exceptions
   ___________________________________________________________________
   Modified: svn:mergeinfo
      Merged /alfresco/BRANCHES/V3.1:r13426


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13541 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-03-10 19:00:32 +00:00
parent d751695bed
commit dcf229bf78
3 changed files with 65 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ import org.alfresco.web.bean.BrowseBean;
import org.alfresco.web.bean.NavigationBean;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.config.DialogsConfigElement.DialogButtonConfig;
import org.alfresco.web.ui.common.ReportedException;
import org.alfresco.web.ui.common.Utils;
/**
@@ -124,7 +125,7 @@ public abstract class BaseDialogBean implements IDialogBean, Serializable
try
{
// Execute
outcome = txnHelper.doInTransaction(callback);
outcome = txnHelper.doInTransaction(callback, false, true);
// allow any subclasses to perform post commit processing
// i.e. resetting state or setting status messages
@@ -138,9 +139,11 @@ public abstract class BaseDialogBean implements IDialogBean, Serializable
{
// reset the flag so we can re-attempt the operation
isFinished = false;
Utils.addErrorMessage(formatErrorMessage(e), e);
outcome = getErrorOutcome(e);
if (e instanceof ReportedException == false)
{
Utils.addErrorMessage(formatErrorMessage(e), e);
}
ReportedException.throwIfNecessary(e);
}
}
@@ -353,7 +356,7 @@ public abstract class BaseDialogBean implements IDialogBean, Serializable
* @return The outcome
*/
protected abstract String finishImpl(FacesContext context, String outcome)
throws Exception;
throws Throwable;
/**
* Performs any post commit processing subclasses may want to provide