u can possibly create a custom class that has firstname and last name.. say something 
like
class Student {
private String firstName;
private String lastName;
... getFirstName() ...
... setFirstName(String firstName)....
... getLastName() ...
... setLastName(String lastName) ...
}

student[0].firstName
student[0].lastName

student[1].firstName
student[1].lastName
...
student[n].firstName
student[n].lastName

as names in your form...

in the ActionForm u can have something like

setStudent(Student[] students) {...}
setStuden(int index, Student student) {...}
getStudent(int index) {...}
getStuden() {...}

Hope this helps ... :)

-----Original Message-----
From: Nathan Maves [mailto:[EMAIL PROTECTED]
Sent: Monday, February 09, 2004 4:24 PM
To: Struts Users Mailing List
Subject: 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]


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

Reply via email to