My scenario: on an ajax event I replace a webmarkupContainer
with one of my components which have some wicket IBehaviorListener
.
The problem is that this replace happen due to ajax request, and the behavior get listed on dom ready:
Wicket.Event.add(window, "domready", function(event) {
Wicket.Ajax.get({'u': 'some/url', 'c': 'linkId', 'e':'click'}));
// ... more event registrations and onDomReady scripts
}
I'm assuming that, being generated in the this event registration code happens for all components that are added explicitly but not for any components that are added dynamically by me.
How can I call the new container with the ajax behaviors or change the current implementation so the wicket ajax behaviors would be called?
Thanks in advance.
I think you need to do add some event registration code in your AjaxRequestTarget.
You can do this by calling