-----Original Message-----
From: Apte, Dhanashree (Noblestar) [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 31, 2005 11:07 AM
To: 'Struts Users Mailing List'
Subject: Beginner question...



This is the first time I am doing web programming and using struts as
well.
I have been meaning to ask this ever since I started. At the risk of
sounding stupid, here is the question:

EVEN I AM ALSO QUITE NEW TO WEB APPLICATION, BUT I WILL TRY TO GIVE YOU THE
SOLUTION RATHER 
THAN ANSWERING WHY LOGIC:ITERATE TAG DOESNT DO WHAT YOU AND LONG TIME BACK I
WAS EXPECTING FROM IT.

If struts is smart enough to figure out logic:iterate and put out the
attributes of each bean from the collection neatly for editing, why is
it
not smart enough to figure out which element the user edited and put the
changed value back in the right property of the right bean in original
collection? Why do I need to have both:
* the Collection attribute for loading up my edit page AND
* the string array for every editable attribute to track the edits made
by
the user?

THERE ARE LOTS OF WAYS BY WHICH WE CAN TELL STRUTS TO AUTOMATICALLY POPULATE
THE FIELDS OF COLLECTION
WHEN THE FORM IS SUBMITTED. STILL YOU CAN USE THE STRING ARRAY AND GET THE
WORK DONE. USING COLLECTION
ATTIRBUTES IN EASIER APPROACH. 

HERE IS THE LINK WHICH WILL EXPLAIN IN DETAIL HOW IS IT DONE.

http://technology.amis.nl/blog/index.php?p=176

I HOPE IT SOLVES YOUR PROBLEM



Thanks!
Dhanashree.

SACHIN

Reply via email to