struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Miller">
Subject Copying beans
Date Wed, 02 Oct 2002 22:18:15 GMT

This might be more of a java question, but please stick with me.

I have a session scope bean which represents my user's configuration. In the bean is 
an ArrayList which contains a list of items that the user "owns". Each item in the list is

itself a bean containing a number of fields. This lot is loaded from a database when 
the user logs in.

Two questions....

If I want to edit one of the beans in the list, do I have to copy one of the beans in the

list into a "standalone" form-bean, and then copy it back into the "list-bean" after the 
user has edited it. OR is there some way that I can use the bean as a form-bean (ie, 
in a struts jsp page) directly? Copying all the data seems like a waste of time.

Is there any *reliable* way of catching when a session scope object is going to be 
destroyed so that I can save it to the database, or am I better doing it everytime it is 


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message