mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Edit space is now done with a property sheet
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2671 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -5,7 +5,9 @@ import java.text.MessageFormat;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.context.UIContextService;
|
||||
@@ -27,6 +29,8 @@ public abstract class BaseDialogBean implements IDialogBean
|
||||
protected BrowseBean browseBean;
|
||||
protected NavigationBean navigator;
|
||||
protected NodeService nodeService;
|
||||
protected FileFolderService fileFolderService;
|
||||
protected SearchService searchService;
|
||||
|
||||
public void init()
|
||||
{
|
||||
@@ -54,7 +58,12 @@ public abstract class BaseDialogBean implements IDialogBean
|
||||
// call the actual implementation
|
||||
outcome = finishImpl(context, outcome);
|
||||
|
||||
// persist the changes
|
||||
tx.commit();
|
||||
|
||||
// allow any subclasses to perform post commit processing
|
||||
// i.e. resetting state or setting status messages
|
||||
outcome = doPostCommitProcessing(context, outcome);
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
@@ -106,6 +115,22 @@ public abstract class BaseDialogBean implements IDialogBean
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fileFolderService used to manipulate folder/folder model nodes
|
||||
*/
|
||||
public void setFileFolderService(FileFolderService fileFolderService)
|
||||
{
|
||||
this.fileFolderService = fileFolderService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param searchService the service used to find nodes
|
||||
*/
|
||||
public void setSearchService(SearchService searchService)
|
||||
{
|
||||
this.searchService = searchService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default cancel outcome
|
||||
*
|
||||
@@ -138,6 +163,20 @@ public abstract class BaseDialogBean implements IDialogBean
|
||||
protected abstract String finishImpl(FacesContext context, String outcome)
|
||||
throws Exception;
|
||||
|
||||
/**
|
||||
* Performs any post commit processing subclasses may want to provide
|
||||
*
|
||||
* @param context FacesContext
|
||||
* @param outcome The default outcome
|
||||
* @return The outcome
|
||||
*/
|
||||
protected String doPostCommitProcessing(FacesContext context, String outcome)
|
||||
{
|
||||
// do nothing by default, subclasses can override if necessary
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a formatted exception string for the given exception
|
||||
*
|
||||
|
Reference in New Issue
Block a user