First thanks for your time trying to help me.

Here is the deal....

I have a list of elements.

Name    Id
Student A       123
Student B 123
Student C 123
Student D 123
Student E 123
Student F 123

and I only have data (first & last name) for some random amount of them. On these rows I want the form to create text fields for these items.

Student A
Student B               joe     schmoe
Student C
Student D               joe     schmoe
Student E               joe     schmoe
Student F       

Since the index from the outside <foreach> will not work for the indexed properties first and last name I believe that I will have to test if the current student row is equal to the next row in the array of data. If they are then I will have to create the <html:text> by hand.

Nathan Maves
Sun Microsystems


On Feb 10, 2004, at 1:40 AM, Villalba Arias, Fredy [BILBOMATICA] wrote:


Hi,

I don't know about indexes, but I can think of a simple solution, Struts-independent (well, not 100%): have all values concatenated in a single "hidden" attribute that get's submitted, using different tokens for separating different values and for separating different records (by record I mean a set of values). Then it's just about parsing it (the value stored on the corresponding property) on the server side. I know It's not the most "elegant" solution, but it you are short of time, then it will surely do it.

HTH,
Freddy.

-----Mensaje original-----
De: Nathan Maves [mailto:[EMAIL PROTECTED]
Enviado el: martes, 10 de febrero de 2004 1:24
Para: Struts Users Mailing List
Asunto: dynamic parameters

I have searched but found nothing on this specific example.

I have a form that will have n number of elements.  Each of these
elements will needs it own name.

example.

list of students is displayed on the screen with two text fields for
their first and last name.

This is for a mass update page.

The only way I can thing of is to have form element like..

<text name="#student_id#-#first_name#">
<text name="#student_id#-#last_name#">

This way in my action I can parse out the student id and then update
the corresponding first and last name.

Can this be done or is there a better way to do it.


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


--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003


--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003


--------------------------------------------------------------------- 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