Re: alternative solution for addOrReplace()?

2014-10-08 Thread Patrick Davids
Hi Andrea, this is the code (a bit pseudo-like...) I am quite sure it is not the way it should be and full of wicket anti-patterns. But still exists since my first wicket experiences 2 years ago. ;-) This panel gets rendered via RefreshingView about 30 times. public ElementPanel(String id,

Re: alternative solution for addOrReplace()?

2014-10-08 Thread Patrick Davids
I think you might have over-complicated your design. Yes, I also think so, but unfortunately currently I'm not able to redesign it, and I try to find a quick solution. :-/ (please have a look at my reply to andreas mail. There is some code...) should be simple to update the parent which in

alternative solution for addOrReplace()?

2014-10-07 Thread Patrick Davids
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...

Re: alternative solution for addOrReplace()?

2014-10-07 Thread Paul Bors
Why not use Ajax? addOrReplace() is really for when you need the full request cycle and have the page rendered on the server side. With Ajax you get your target for which you can add all the components you want to refresh on the page. Given the day and age we live in, I don't think there is a

Re: alternative solution for addOrReplace()?

2014-10-07 Thread Patrick Davids
Hi Paul, thanx for replying. Oh, I use Ajax very heavily in this case. Thats why I said: the panel works quite good for ajax rendering and refreshing use-cases Hmm... ok... I think I missed some details. I try to explain. My page contains two sections seperated from each other. A kind of

Re: alternative solution for addOrReplace()?

2014-10-07 Thread Andrea Del Bene
Hi, could you post the code you use inside onConfigure to addOrReplace inner container? Maybe you could avoid detaching/attaching overriding method detachModels in your inner containers. Hi Paul, thanx for replying. Oh, I use Ajax very heavily in this case. Thats why I said: the panel works

Re: alternative solution for addOrReplace()?

2014-10-07 Thread Paul Bors
I think you might have over-complicated your design. Your use-case is quite simple, you have user input that filters the display. It might be that there are a lot of panels to be updated but then again it should be simple to update the parent which in turn delegates that responsibility to the