Sun Java System Portal Server 7.2 Developer's Guide

ProcedureTo Use the Tag Libraries in Your JSP

  1. Ensure that the saw.tld file is in classpath.

  2. Add the declaration on the JSP.


    <%@ taglib uri="http://java.sun.com/saw" prefix="saw"%>
  3. Use the following tag library to get tasks that meet the search criteria.


    <c:catch var="getTasksException">
    <saw:getTasks filterTaskVO="${sessionScope.filterTaskVO}" returnvalue="taskList"/>
    </c:catch>

    It takes the following two attributes

    • filterTaskVO - Instance of the FilterTaskVO object

    • returnvalue - Name under which the list of workflowTaskVOs are available in the JSP, for the user to iterate and print.


    <c:forEach items = "${taskList}"  var ="task">
    </c:forEach>
  4. Use the following tag library to get the count of number of tasks that match the search criteria.


    <saw:countTask filterTaskVO="${sessionScope.filterTaskVO}"
    returnvalue="taskCount" subordinateCount="true"/>

    Besides the filterTaskVO and returnvalue attributes, the count task include another attribute called the subordinateCount. The subordinateCount attribute decides whether the count should include the tasks assigned to the subordinates of the user.

  5. Use the following tag library to get the details of a task.


    <c:catch var="getTasksException">
    <saw:getTaskById filterTaskVO="${sessionScope.filterTaskVO}" returnvalue="taskInfo"/>
    </c:catch>

    Use ${taskInfo.input} to access the task attributes available in the JSP.

  6. All the above taglib calls, optionally take a properties attribute also. If you set this properties attribute value, then the WorkflowFactory does not look for the WorkflowConfig.properties classpath, instead uses this properties object. For example:


    <c:catch var="getTasksException">
    <saw:getTasks filterTaskVO="${sessionScope.filterTaskVO}" returnvalue="taskList"
    properties="${sessionScope.propObject}"/>
    </c:catch>