0
votes

I am new to wicket and stuck in a Panel refresh problem with AjaxRequestTarget. I am clarifying my scenario below.

In the Ui I have a Panel (A) which contains another Panel (B) and B contains some buttons and table. I Panel A, I have a Event which will refresh My Panel B with AjaxRequestTarget. On event I am adding Panel B in my AjaxRequestTarget.add() but it's not calling my initialize method in Panel B. So, Panel B is not refreshing properly.

It's a existing code so, can't move the event to Panel B. So, need to do something from Panel A itself.

Clarifying more:

After few debgus I found my problem in some other places. It's not about refreshing Panel B. It's all about refreshment of Panel A. Panel A extends Panel and when I am refreshing with Ajax Timer Panel A's components scrumble up and due to this My Panel B also scrumbled up. So, Can anyone help me on that

2
Can you provide us with some example that demonstrate your issue so it we can give you more clear answer - Alexey Mukas

2 Answers

0
votes

I think you need to put your "refreshing" code of the Panel B in the onConfigure method which is called once per request.

If you provide code sample my answer could be improved with an example.

0
votes

onInitialize is called when your component is added to the component hierarchy. onConfigure is called once per request processing for each component that is part of the request cycle (which yours is during Ajax if you add it to the Ajax request target). It is called for invisible components as well. Don't forget to call super().