wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Davids <patrick.dav...@nubologic.com>
Subject alternative solution for addOrReplace()?
Date Tue, 07 Oct 2014 13:51:44 GMT
Hi all,
I have a panel, which renders a inner markupcontainer (different panels 
for different ways of displaying my model object) depending on its model 
objects type.

I do this by addOrReplace() the inner panel in an onConfigure() having 
an "if instanceof"; and it also iterates over a list...

I'm not sure, if it is a good solution (I dont like the instanceof 
approach), but the panel works quite good for ajax rendering and 
refreshing use-cases.

But, the addOrReplace() has one big disadvantage.
It forces to detach the model on each iteration, so on each iteration I 
get a database access to retrieve it again.

Is there anyway to keep the model attached until the entire request 
cycle is finished?

Or should I try to find complete other solution for this kind of "high 
dynamic iterating panel"?
Is it better to use e.g. Fragments to display a model object in 
different ways depending on its state?

Please give some inspirations... I ran out of ideas. Help!

kind regards :-)
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org

View raw message