You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pedro Rodriguez <pr...@accovia.com> on 2003/11/17 16:39:46 UTC
[Struts Workflow] - A taglib to expose any current workflow state
I wrote this taglib (see attachment) to expose any current workflow
state.
Its purpose is to allow workflow-driven navigation in a jsp like that:
<strutsWorkflow:getWorkflowState id="myWorkflowState"
workflow="myWorkflow" />
<c:choose>
<c:when test="${ myWorkflowState == 'some_state'}">
- A specific Action link here -
</c:when>
<c:otherwise>
- some other Action link here --
</c:otherwise>
</c:choose>
Do you think it is a good idea or require using the Struts Workflow
framework?
This is the tld definition:
<tag>
<name>getWorkflowState</name>
<tagclass>MY_PACKAGE.GetWorkflowStateTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>workflow</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>toScope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
Thanks a lot,
Pedro Rodriguez