Added ability to pass parameters to wizards and dialogs

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2807 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2006-05-10 11:33:02 +00:00
parent c953c45c3d
commit 8cd2a68717
13 changed files with 90 additions and 24 deletions

View File

@@ -1,6 +1,8 @@
package org.alfresco.web.bean.dialog;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.transaction.UserTransaction;
@@ -25,6 +27,7 @@ import org.alfresco.web.ui.common.Utils;
*/
public abstract class BaseDialogBean implements IDialogBean
{
protected Map<String, String> parameters;
protected boolean isFinished = false;
// services common to most dialogs
@@ -36,11 +39,19 @@ public abstract class BaseDialogBean implements IDialogBean
protected DictionaryService dictionaryService;
protected NamespaceService namespaceService;
public void init()
public void init(Map<String, String> parameters)
{
// tell any beans to update themselves so the UI gets refreshed
UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans();
// store the parameters, create empty map if necessary
this.parameters = parameters;
if (this.parameters == null)
{
this.parameters = new HashMap<String, String>();
}
// reset the isFinished flag
this.isFinished = false;
}