You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shirish <sh...@yahoo.co.in> on 2005/05/18 02:18:47 UTC

How to populate / validate dynaform?

Dyna form 
------------------------------------------------------------------
<form-bean name="adjustmentForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property   name="employees" type=""java.util.ArrayList"" />
</form-bean>
------------------------------------------------------------------
Genrated HTML code using logic:iterate , indexed="true"

<tr>
    <td> <input type="checkbox" name="employee[0].empid" value="7464264327" checked="checked"></td>
    <td>7464264327  </td>
    <td>BARKSDALE,JACK <input type="hidden" name="employee[0].employeename" value="BARKSDALE,JACK"> </td>
    <td>150.00 <input type="hidden" name="employee[0].premium" value="150.00"> </td>
    <td><select  id="reason" name="reason"> <option value=""></option></select></td>  // This is still under construction
   <td><input type="text" name="employee[0].date" value=""> <input type="hidden" name="employee[0].date" value=""></td>
</tr>
<tr>
 
    <td> <input type="checkbox" name="employee[1].empid" value="7464264324" checked="checked"></td>
    <td>ARBOR,ROBERT B <input type="hidden" name="employee[1].employeename" value="ARBOR,ROBERT B"> </td>
    <td >EMP <input type="hidden" name="employee[1].tier" value="EMP"></td>
    <td>100.00 <input type="hidden" name="employee[1].premium" value="100.00"> </td>
    <td><select  id="reason" name="reason"> <option value=""></option></select></td>
   <td><input type="text" name="employee[1].date" value=""> <input type="hidden" name="employee[1].date" value=""></td>
</tr>
.
.
.
<input type=submit>
------------------------------------------------------------------------------------------

After click on submit button, form get submit but not populate dyna form as it's not populate validation not possible.

 

Thanks

Shirish

 


		
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.

Re: How to populate / validate dynaform?

Posted by Jeff Beal <jb...@gmail.com>.
I never use DynaForm myself, but it looks like there's no way to know
which type of object should be going into the ArrayList.  Maybe
somebody else can figure out where to go from there.

-- Jeff

On 5/17/05, Shirish <sh...@yahoo.co.in> wrote:
> Dyna form 
> ------------------------------------------------------------------
> <form-bean name="adjustmentForm"
> type="org.apache.struts.validator.DynaValidatorForm">
> <form-property   name="employees" type=""java.util.ArrayList"" />
> </form-bean>
> ------------------------------------------------------------------
> Genrated HTML code using logic:iterate , indexed="true"
> 
> <tr>
>     <td> <input type="checkbox" name="employee[0].empid" value="7464264327"
> checked="checked"></td>
>     <td>7464264327  </td>
>     <td>BARKSDALE,JACK <input type="hidden" name="employee[0].employeename"
> value="BARKSDALE,JACK"> </td>
>     <td>150.00 <input type="hidden" name="employee[0].premium"
> value="150.00"> </td>
>     <td><select  id="reason" name="reason"> <option
> value=""></option></select></td>  // This is still under construction
>    <td><input type="text" name="employee[0].date" value=""> <input
> type="hidden" name="employee[0].date" value=""></td>
> </tr>
> <tr>
>  
>     <td> <input type="checkbox" name="employee[1].empid" value="7464264324"
> checked="checked"></td>
>     <td>ARBOR,ROBERT B <input type="hidden" name="employee[1].employeename"
> value="ARBOR,ROBERT B"> </td>
>     <td >EMP <input type="hidden" name="employee[1].tier" value="EMP"></td>
>     <td>100.00 <input type="hidden" name="employee[1].premium"
> value="100.00"> </td>
>     <td><select  id="reason" name="reason"> <option
> value=""></option></select></td>
>    <td><input type="text" name="employee[1].date" value=""> <input
> type="hidden" name="employee[1].date" value=""></td>
> </tr>
> .
> .
> .
> <input type=submit>
> ------------------------------------------------------------------------------------------
> 
> After click on submit button, form get submit but not populate dyna form as
> it's not populate validation not possible.
> 
>  
> 
> Thanks
> 
> Shirish
> 
>  
> 
> 
> 		
> ---------------------------------
> Do you Yahoo!?
>  Yahoo! Mail - You care about security. So do we.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org