I am using dynaforms, i have a customer form where i have one property as arraylist in dynaform
form-property name="activeInd" type="java.lang.String"
form-property name="assoc" type="java.util.ArrayList"
I am using display tags in the view everything works fine, but i have an add button in page where i can add a association, in one of
java class i am updating the property like this when association is added by submitting request from add button
ArrayList currentAssocs = (ArrayList)customerForm.get("assoc");
String newAssocNumber = (String)customerForm.get("newAssocNumber");
Cust newAssocCust = Cust.readCustInfoFromDB(newAssocNumber, dataSession, transaction);
currentAssocs.add(newAssocCust);
customerForm.set("assoc",currentAssocs);
updating the form object with latest property with above code .later when i am trying to save(submit request from save button) I am trying to retrieve the arraylist i set but i dont get that back !!!
ArrayList currentAssocs = (ArrayList)customerForm.get("assoc");
if(currentAssocs!=null && currentAssocs.size()>0 ){
customer.setAssociations(currentAssocs);
}
//save customer code here..
in
struts config i have set the scope as request
<action name="newcustomerForm" path="/Permits/NewCustomer" input="permits.NewCustomer" parameter="action" scope="request" type="us.ny.state.dot.permits.actions.CustomerDispatchAction" validate="false">
<set-property property="secure" value="true"/>
<forward name="successGet" path="permits.NewCustomer"/>
<forward name="successUpdate" path="permits.NewCustomer"/> <forward name="successPost" path="permits.CustomerCreated"/>
<forward name="replay" path="permits.NewCustomer"/>
</action>
any Ideas!