Hi fellow stripers

Stripes early binding to objects from the database makes it possible to do
things like:

http://whatever/user/User.action?user=9&user.name=Kurt

and automatically let Stripes make sure that the user with id=9 from the
database get the name="Kurt". This is fine if we want to allow the end user
to make such a change.

It is possible to limit this by not comitting the hibernate session if the
user is to see an object - not change it, but that is not always enough.

I only commit when the request is a "save" request.

So I commit an action to:
http://whatever/user/SAVE.action?user=9&user.name=Kurt

While I do not commit an action to:
http://whatever/user/VIEW.action?user=9&user.name=Kurt
ensuring that the user.setName("Kurt") is not committed to the database.

Now I introduced a small statistics entity using hibernate, so that I create
and save a new entity when I go to the VIEW action. This means I have to
commit the hibernate session on view. This exposes the user object to be
editable in the VIEW action.

I hope to be able to limit what objects must be comitted and what changes
must be transient.

Any hints?

-- 
Morten Matras
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to