Hi,

I have a form displaying checkboxs, the ActionForm contains an arraylist
which contains beans with description and status for each checkbox. My
problem is that the checkboxs display fine but when submitting the form
(with changes), I can only seem to get either the beans with the original
data (ie: not updated) or beans with no data. I am new to struts (and
JSPs...). Any pointers would be appreciated.

struts-config.xml:
  <action
      path="/brokerMapping"
      type="com.rule.action.BrokerMappingAction"
      scope="session"
      name="brokerMappingForm"
      validate="false"
      input="/brokerMapping.jsp">
      <forward name="Success" path="/brokerMapping.jsp" redirect="false"/>
      <forward name="Failure" path="/brokerMapping.jsp" redirect="true"/>
  </action>

jsp:
<html:form action="brokerMapping" scope="session">
...
<logic:iterate id="brokerList" collection="<%= brokers %>">
        <tr>
        <td width="15" bgcolor="#6699FF"></td>
            <td width="15"></td><td width="379"></td>
            <td width="15"></td>
            <td width="15"></td>
    <td width="15"></td>
        <td><bean:write name="brokerList" property="name"/></td>
        <td><html:checkbox name="brokerList" property="status"/></td>
        </tr>
</logic:iterate>

Action:
if(action.equals("Update"))
      {
        logger.debug("Update action");
        BrokerMappingForm brokerForm = (BrokerMappingForm)form;
        ArrayList brokerList = brokerForm.getBrokers();
        BrokerService service = new BrokerService();
        service.updateBrokerMapping(fmgid, brokerList);
      }

thanks

Dan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to