Sebastian Ho wrote:

I thought of putting the TO in session as well to prevent another DB
call.

This will work but if you are using a decent persistence mechanism another call to your backend layer will have the results of that query cached so the performance hit is extremely minimal. And unless the db call was some extremely complex long query, I wouldn't even worry about one extra DB call to populate the TO before doing the update (there are probably a lot more other things that will slow down an app than that DB call).


I still think this solution is the cleanest and easiest to implement:

//in update dispatch action or update action:

TransferObject to = BackendEnd.getMyTransferObject(..);
MyForm myForm = (MyForm)form;
BeanUtils.copyProperties( to, myForm);
BackEnd.doUpdate( to );

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to