The moose likes Struts and the fly likes a question on data submitting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "a question on data submitting" Watch "a question on data submitting" New topic

a question on data submitting

David Liu

Joined: Apr 16, 2002
Posts: 24
the case is:
first, user execute a query
and display the queried data in the <html:text> of jsp using tag <logic:iterate>
and I store the resultset in session and jsp get resultset from session
but after the query the user can modify the data and update the data in DB
but I wonder how can I transfer the modified resultset to ActionForm
and ActionForm transfers it to Action
because the resultset is a data-bean list and the ActionForm is a data-bean
this is the question
thanks for help

It's better burn out than to fade away.
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

The Data Transfer Object pattern is useful in situations like this. [This tutorial makes extensive use of the pattern.
If your UI allows the user to change more than one record at a time, you'll need to put a collection of DTOs in your form as an indexed property.

Junilu - [How to Ask Questions] [How to Answer Questions]
I agree. Here's the link:
subject: a question on data submitting
It's not a secret anymore!