mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Manage Task Dialog (from web-client) can now be launched from the MyTasks portlet for an individual task.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5813 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
package org.alfresco.web.bean.workflow;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -41,6 +42,7 @@ import org.alfresco.service.cmr.workflow.WorkflowTaskDefinition;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowTaskState;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowTransition;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.ParameterCheck;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
@@ -69,6 +71,9 @@ public class WorkflowBean
|
||||
|
||||
private static final Log logger = LogFactory.getLog(WorkflowBean.class);
|
||||
|
||||
public static final String BEAN_NAME = "WorkflowBean";
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Bean Getters and Setters
|
||||
|
||||
@@ -251,6 +256,7 @@ public class WorkflowBean
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Navigation handlers
|
||||
|
||||
@@ -269,6 +275,23 @@ public class WorkflowBean
|
||||
Application.getDialogManager().setupParameters(event);
|
||||
}
|
||||
|
||||
public void setupTaskDialog(String id, String type)
|
||||
{
|
||||
ParameterCheck.mandatoryString("Task ID", id);
|
||||
ParameterCheck.mandatoryString("Task Type", type);
|
||||
|
||||
// setup the dispatch context with the task we're opening a dialog for
|
||||
TransientNode node = new TransientNode(QName.createQName(type), id, null);
|
||||
this.navigationBean.setupDispatchContext(node);
|
||||
|
||||
// pass on parameters for the dialog
|
||||
Map<String, String> params = new HashMap<String, String>(2, 1.0f);
|
||||
params.put("id", id);
|
||||
params.put("type", type);
|
||||
Application.getDialogManager().setupParameters(params);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Helper methods
|
||||
|
||||
|
Reference in New Issue
Block a user