mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user