mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
My Tasks improvements, fixes to webscript empty filter argument handling.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5581 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -58,7 +58,7 @@ public class TaskInfoBean
|
||||
private WorkflowService workflowService;
|
||||
|
||||
/**
|
||||
* Returns information on the node identified by the 'taskId'
|
||||
* Returns information for the workflow task identified by the 'taskId'
|
||||
* parameter found in the ExternalContext.
|
||||
* <p>
|
||||
* The result is the formatted HTML to show on the client.
|
||||
@@ -85,6 +85,35 @@ public class TaskInfoBean
|
||||
out.write("<span class='errorMessage'>Task could not be found.</span>");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the resource list for the workflow task identified by the 'taskId'
|
||||
* parameter found in the ExternalContext.
|
||||
* <p>
|
||||
* The result is the formatted HTML to show on the client.
|
||||
*/
|
||||
public void sendTaskResources() throws IOException
|
||||
{
|
||||
FacesContext context = FacesContext.getCurrentInstance();
|
||||
ResponseWriter out = context.getResponseWriter();
|
||||
|
||||
String taskId = (String)context.getExternalContext().getRequestParameterMap().get("taskId");
|
||||
if (taskId == null || taskId.length() == 0)
|
||||
{
|
||||
throw new IllegalArgumentException("'taskId' parameter is missing");
|
||||
}
|
||||
|
||||
WorkflowTask task = this.workflowService.getTaskById(taskId);
|
||||
if (task != null)
|
||||
{
|
||||
Repository.getServiceRegistry(context).getTemplateService().processTemplate(
|
||||
"/alfresco/templates/client/task_resource_panel.ftl", getModel(task), out);
|
||||
}
|
||||
else
|
||||
{
|
||||
out.write("<span class='errorMessage'>Task could not be found.</span>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user