Using checkbox to delete elements from a list
Hi guys.
I ve got an action class that calls an EJB that returns a list. I am storing that list in the request scope and getting it back in the front end
List clients = m_clientValidation.searchByHostNameAndIPAddress(hostName, IPAddress);
request.setAttribute("clients", clients);
<logic:iterate id="client" name="clients">
<tr>
<td>
<bean:write name="client" property="hostName"/>
</td>
<td>
<bean:write name="client" property="ipAddress"/>
</td>
<td>
<html:checkbox name="client" property="checked"/>
</td>
</tr>
</logic:iterate>
As you can see I also want to use a check box for deleting the elements in my collection. I am retrieving the values normally so there is not problem here.
But the problem I am facing is that I need to have these values in a bean (Form) and call that form from another Action
something like
<html:form action="unblockClient.do">
<logic:iterate id="client" name="clients">
<tr>
<td>
<bean:write name="client" property="hostName"/>
</td>
<td>
<bean:write name="client" property="ipAddress"/>
</td>
<td>
<html:checkbox name="client" property="checked"/>
</td>
</tr>
</logic:iterate>
<html:submit/>
</html:form>
But of course I am getting an error message that "clients could not be found in any scope". So how am I gonna call the Form that I want my selected values stored in and at the same time extracting the collection that I have stored from the previus Action servlet?
Any reply is highly appreciated.
Thanks

