What wicket version are you using? The components being rendered have to
be attached on ajax update.
-Matej
Jean-Baptiste Quenot wrote:
Hi,
Thanks for moving the repeater package to core.
However, I'm currently developing an application that updates the
UI using Ajax only, and I noticed that building a RefreshingView
on the fly and rendering it with a Component.replace() and an
AjaxRequestTarget does not work: the list contents are not
computed.
The fact is that RefreshingView populates its contents in
internalOnAttach(), whereas Component.renderComponent() does not
call internalAttach() during an Ajax request.
If you can confirm that, I can file a JIRA issue, with the
attached patch that solves the problem for me.
TIA,
------------------------------------------------------------------------
Index: src/main/java/wicket/Component.java
===================================================================
--- src/main/java/wicket/Component.java (revision 490318)
+++ src/main/java/wicket/Component.java (working copy)
@@ -33,7 +33,6 @@
import wicket.authorization.UnauthorizedActionException;
import wicket.behavior.IBehavior;
import wicket.feedback.FeedbackMessage;
-import wicket.feedback.IFeedback;
import wicket.markup.ComponentTag;
import wicket.markup.MarkupException;
import wicket.markup.MarkupStream;
@@ -1592,6 +1591,8 @@
}
else
{
+ internalAttach();
+
// Save the parent's markup stream to re-assign it at
the end
MarkupContainer parent = getParent();
MarkupStream originalMarkupStream =
parent.getMarkupStream();
--
get professional wicket training and consultation
http://www.wicket-support.com