Adding values from left to right and right to left
[nobr]Hi,
I am trying to add the values from left to right and remove from right to left. I need somebody's help as to how to move values from left to right box and right to left.
If I select an item in the left and say add, the item has to be removed from the left box and added to the rigtht box and vice versa.
WorkQueueListBean.availableWorkQueues hold's the values of left box and WorkQueueListBean.assignedWorkQueues holds the values of right box. Finally the changed values need to be updated in this bean so as to update the same in the database.
Here is my code:
<aa:zone name="znQueueMaintainance">
<Table>
<TR>
<TD style="font-size: 10pt; font-weight: bold;">Available Queues:</TD>
<TD></TD>
<TD style="font-size: 10pt; font-weight: bold;">Assigned Queues:</TD>
</TR>
<TR>
<TD>
<select id="AvailableQueues" name="AvailableQueues" size=20 multiple style="width:140pt;">
<c:forEach items="${WorkQueueListBean.availableWorkQueues}" var="e">
<Option><c:out value="${e.availableWorkQueues}"/></Option>
</c:forEach>
</select>
</TD>
<TD>
<Table>
<TR><TD><input type="button" value=">>" onclick="addFunction();" class="button" /></TD></TR>
<TR><TD><input type="button" value="<<" onclick="removeFunction();" class="button" /></TD></TR>
</TABLE>
<BR/>
</TD>
<TD>
<select id="AssignQueues" name="AssignQueues" size=20 multiple style="width:140pt;">
<c:forEach items="${WorkQueueListBean.assignedWorkQueues}" var="e">
<Option>><c:out value="${e.assignedWorkQueues}"/></Option>
</c:forEach>
</select>
</TD>
</TR>
</TABLE>
</aa:zone>
Thanks[/nobr]

