---
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
(original)
+++
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
Sat Mar 12 16:28:57 2011
@@ -698,7 +698,9 @@ public abstract class WebApplication ext
        */
       public AjaxRequestTarget newAjaxRequestTarget(final Page page)
       {
-               return new AjaxRequestTarget(page);
+               AjaxRequestTarget target = new AjaxRequestTarget(page);
+               target.addListener(new AjaxEnclosureListener());
+               return target;
       }

Maybe this should be left to the user.
Now on each Ajax request this new listener traverses the whole page tree to
look for InlineEnclosure children and auto-add them for Ajax repaint if
their controlling child is added earlier for repaint.

In 1.5 this can be done in InlineEnclosure's ctor with the new listeners
(org.apache.wicket.protocol.http.WebApplication.getAjaxRequestTargetListeners())
but in 1.4 there is no such easy way.

I think users of InlineEnclosure should care to add this listener.
What do you think ?

Reply via email to