Trying to figure this out and I figure there is a way that is more
logical, can anyone help?
When saving an object to a session then, retriveing that object through
struts as a ActionForm then doing an update I get duplicate rows.
ie...
I do something like
//get formObject
Database db = getDatabase();
db.begin();
/// get object here... select ....
db.commit();
db.close();
testob = getMyObjectForm();
session.setAttribute("here", testob);
/// then display the object via jsp
//on submit
testob = (aTestOb) form;
Database db = getDatabase();
db.begin();
db.update(scf);
db.commit();
db.close();
Results in duplicate objects obviously because the form object struts
is passing in, is not the same object as stored in the session. I have
done some testing of tring to retrieve the sesssion object on submit,
then setting that object's values exactly like the one passed in the
form. But this doesn't seem to appear to be a good idea either, and
didn't work at first when I tried it.
Eric
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------