I have a multi select box like,
<select name="prGroup" id="prGroup" multiple="true">
<option value="All">All</option>
<c:forEach var="item" items="${model.prGrpList}">
<option value="<c:out value='${item.deptDescTx}'/>" <c:if test="${ViewSummaryForm.prGroup == item.deptDescTx}">SELECTED</c:if>>
<c:out value="${item.deptDescTx}"/>
</option>
</c:forEach>
</select>
where prGroup
is a form value and is a String array. model.prGrpList
is a request parameter which gives the list values eg: AK,CA,VA, DC, MD, FL, DA...now I select for example CA and VA from the multi select button. It goes to action class and picks up corresponding values and when UI is displayed CA and VA should still be selected. With above it works for a String.
How can I make it work for String array where String array has values CA and VA(for example).
Any i/p's or suggestions?