Hi,
When I select from a system list(populated using optionsCollection ) it works very well. For instance, systemname[0] = '21' if I select the 1st system in the list. Problem is when I unselect that system. systemname[0] is still = '21' when it should be = to '' or null
When I trace the code, I can see the setSystemName() being executed when I select a system. But the same method isn't executed when I unselect the system I selected before. So, systemname[0] is still = '21' and nothing is selected on the window. How do I get around that problem when I unselect all data in a optionsCollection? I don't want to use the reset button for this. Below I added code from the formbean and
jsp page.
thanks.
In struts-config, action for the search form..
<action path="/smtSearch" type="gov.mdot.webapp.smt.control.action.SearchAction"
name="SearchForm"
input="/jsp/Search.jsp"
delegater="gov.mdot.webapp.smt.delegate.SearchDelegateImpl"
scope="session"
validate="true" >
<forward name="success" path="/jsp/Search.jsp"/>
</action>
// formbean
private
String systemName[]
// jsp page
<TD align="left" valign="top">
<html:select property="systemName" size="10" multiple="multiple">
<html:optionsCollection name="SearchForm" property="systemList"/>
</html:select>
</TD>