Do you want to store all the rows in each bean as array of Bean. In
other words, if you have two rows, then have an bean Array of size 2.
The bean will be off course having the first name last name and data...

If so , this is certainly possible. 

Try looking at the DynaActionForm. Define the property as
"xxx.xxx.yourBean[]"  for the DynaActionForm. 

Use the html:input tags with the indexed feature in your jsp.

This should get  you started. 

   

-----Original Message-----
From: Andreas Schoernig [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 07, 2004 9:09 AM
To: Struts Users Mailing List
Subject: array-input form ?!

Hi all, 

maybe someone can help me, I found no informations so long at google
(maybe wrong search-words).

My problem is: 

I have a html-site where you can enter your first and lastname and a few
more datas to order informations. If you want set more names to the list
you can click on a button and there are one more first-and
lastname-fields. 

(this clicks are possible as many as the configuration-counter is set
(for example 4)) the fields i set at the html-code with 
   <tr id="id$val" style="visibility:hidden"> and then with javascript i
set the visibility to visible.... )

the complete code at a for-each-clause at the code is is:



   <tr id="id$val" style="visibility:hidden">
      <td><input name="firstName" type="text" value=""  style="width:95%
;height:20px;"></td>
      <td><input name="lastName" type="text" value=""  style="width:95%;
height:20px;"></td>
      <td><input name="data" type="text" value=""  style="width:95%;
height:20px;"></td>
      <td colspan="2"><input id="td$val" name="data2" type="text"
value=""
style="width:95%; height:20px;"></td>
   </tr>

$val is the counter (use velocity for the view)...


i have a bean where firstname, lastname, data and data2 is in... but how
can I get a bean-array for each entry ?

hope you understand my question and can help me... (or is this not
possible ? )

thanks...


bye, 

Andi




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


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

Reply via email to