Peter Veentjer - Anchor Men wrote:
What didn't you use in swing? No models? that is not really possible you
have to use models in swing (and also in wicket)
----------------
I don`t think you understand my reply. I have no problems with models, but I have problems with wrappers around objects that controle attaching/detaching. It makes simple things complex and that is what I`m trying to avoid. If this could done transparently (with metadata for example) I wouldn`t have much trouble with it.
I still don't understand what you find so complex around a simple model that handles the detach/attach for youre components.
What are you willing to call for a component constructor?
like textfield:

TextField tf = TextField("myId", new DetachableModel(myPerson))

What is difficult in that constructor?
After that you just call:

tf.setModelObject(mySecondPerson);

And you don't have to worry about the underlying detachable code.. That just happens.

And remember detachable models are not just meant for database objects. They are also there for keeping the session as small as possible.

And how do you want to detach if you don't have wrappers around you're
hibernate objects/lists that do the deattachements?
------------------------------------
Well.. maybe no detachement at all. If you use a long session, objects don`t 
have to be detached because the session is not closed. It is only disconnected.

Long session objects? Do you hold and jdbc connection completely under the hood then also? Is such a session serializable? Because that is pretty much a requirement for everything you store in the HttpSession.

Long session objects or Long (transaction) jdbc connections aren't a solution if you ask me.

johan



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to