struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adam pinder <>
Subject Array Input Fields
Date Fri, 10 Sep 2010 17:08:50 GMT

Using Struts 2.0.11


I have a jsp that creates elements like



<input type="text" id="user[1].name" name="user[1].name" value="smith" size="20" />




when the form is submitted to the server i want the parameters interceptor to set the values
on each user object so i have a method


public User getUser(int occ)


    return users.get(occ);



which would return a user object. users is a List<User> object


therefore i'd expect the params interceptor to make calls like   getUser(1).setName("smith")
for the above input field sent to the server.... but it doesn't set the value or error - the
params interceptor debug shows the correct name/value pair of user[1].name => [smith]


i have also tried with a string as the occ parameter but still no joy.


anyone have any suggestions ?




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message