Hello,

I have a catch-all feedback panel which displays feedback messages at the top of my web pages. It slides-in the message boxes and adds a "close" link to each one.

It also has an event handler which makes sure it redraws itself each time Wicket handles an ajax request:

    @Override
    public void onEvent(IEvent<?> a_event) {
// This makes sure the panel always adds itself to the ajax response
        if (a_event.getPayload() instanceof AjaxRequestTarget) {
            ((AjaxRequestTarget) a_event.getPayload()).add(this);
        }
    }

This way, I don't have to add it explicitly to the request target each time a component adds a session message.

After each request, the default behavior is to clear all rendered feedback messages from the session. My problem is that each time an ajax request is made, the currently displayed feedback message list is replaced by a new one. This removes any unclosed messages still present from the DOM.

How can I tell Wicket ajax to append DOM elements to a parent instead of re-rendering the parent and its children? Is there another solution?

Not clearing the messages from the session and displaying them again is not an option because the fade-in animation would be repeated.

Regards,
Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to