struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajoy" <>
Subject Newbie: Iterate tag : Object properties not updated to form bean from JSP
Date Mon, 03 Sep 2001 14:28:48 GMT
HI all 
I've encountered a situation as follows

1. I have a 'UserInfoContainer'  form bean which contains a Vector of  individual 'UserInfo'
2. Each UserInfo object is iterated through using the 'iterate' tag in the JSP.
3. Some 'UserInfo'  data (say 'NickName' ) is displayed in a text box so that the user can
modify it.

Every thing is going fine till now. The trouble is when I retrieve the 'NickName' from each
UserInfo object in the UserInfoContainer object passed to the perform method , it doesn't
reflect the modifications user entered in the text box. Basicaly the data entered by the user
isn't set back to each UserInfo object.

I've read in the struts docs that the iterate tag copies each object in the collection ( in
my case the userinfo veactor) to a page scope bean referenced by the value of 'index' attribute.
So I guess the values in the text boxes inside the iterate tag never gets set to the original
objects in the FormBean. 
A. Is my understanding correct ?
B. Am I doing somethimng wrong here ? 
C. Is there any way to tackle this problem?

I am at present using lots of request.getParameter methods to get the values edited by the
user. But it really does increaase dependency between the JSP pages and  the action classes.
SO I wonder whether that is the correct way to go even ...

FYI : 'UserInfoContainer' is a session scope formbean.
Thankx in advance 

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