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:
Kevin Roast
2007-04-30 20:59:55 +00:00
parent 2a583fe2dc
commit 72b5e97ad2
5 changed files with 164 additions and 17 deletions

View File

@@ -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>");
}
}
// ------------------------------------------------------------------------------