Hi folks,
Using SWF 1.0.5, and Spring 2.5, I've got a form with checkboxes, which whenever any of the checkboxes are checked, the trigger for the flow transition (selection) doesn't get sent, and so the view remains on the form page. However, if all the checkboxes are unchecked, then the selection transition trigger works fine.
Here's some of the flow-xml:
My jsp looks like thisCode:<action-state id="CHOOSE"> <bean-action bean="worker" method="updateList"> <method-arguments> <argument expression="flowScope.sess"/> </method-arguments> </bean-action> <bean-action bean="worker" method="testMethod"> <method-arguments> <argument expression="flowScope.sess"/> </method-arguments> </bean-action> <transition on="success" to="CHOOSE2"/> </action-state> <view-state id="CHOOSE2" view="choose"> <render-actions> <action bean="formAction" method="setupForm"/> </render-actions> <transition on="selection" to="HANDLING"> <action bean="formAction" method="bind"/> </transition> <transition on="none" to="CANCEL"/> </view-state>
userSelection is a java.util.list in the form backing class. The 'Choose these ones' button does nothing unless no checkboxes are selected. How can I make it work?Code:<form:form commandName="sess" method="post"> <c:forEach items="${sess.Options}" var="sessT"> <%= rowCounter % 2 == 0 ? "<tr class=\"odd\">" : "<tr class=\"even\">" %> <% rowCounter++; %> <td> <form:checkbox path="userSelection" value="<c:out value='${sessT.id}'/>"/> </td> <td> <c:out value='${sessT.id}'/> </td> <td> <c:out value="${sessT.name}"/> </td> <td> <c:out value="${sessT.description}"/> </td> </tr> </c:forEach> </table> <br> <br> <input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}"/> <input type="submit" class="button" name="_eventId_selection" value="Choose these ones"/> </form:form> <form type="post"> <input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}"/> <input type="submit" class="button" name="_eventId_none" value="Cancel and return"/> </form>
Another (baffling) problem, is that at the previous action-state, only the first action: updateList is called, the testMethod isn't being called at all!?!
Many thanks for any solutions.


Reply With Quote