Hi, is devicesGroup initially visible? if not you need to setOutputMarkupplaceHolder(true) in it. Because otherwise wicket will not output anything for it and AJAX replacement will fail at client side.
On Fri, Oct 28, 2022 at 4:27 PM Martin Grigorov <mgrigo...@apache.org> wrote: > Hi Laurent, > > Few questions: > 1) is the Ajax call actually executed ? > Set a breakpoint inside #onClick() and see whether it breaks > 2) Is there any error (Java or JavaScript) ? > Check both the server logs and the browser console > > > On Fri, Oct 28, 2022 at 10:45 AM Laurent Duparchy <dupar...@esrf.fr> > wrote: > > > Hi, > > > > Sorry for the basic question.... If this is the wrong place to ask, > please > > tell me. > > If there is a relevant documentation to read, tell me as well. > > > > I'm upgrading a very old & small app from Wicket 1.4 to Wicket 9. > > > > Following an Ajax call, one component is not refreshed as it was before. > > > > This is the "userDevicesListView" which is inside the "devicesGroup" > > component. See below. > > > > > <div id="wakeUpForm"> > > > <form wicket:id = "wakeUpForm"> > > > <div wicket:id="devicesGroup"> > > > > > > <table class="wakeUptable" > > > > <th><wicket:message key="selectMessage"/></th> > > > <th><wicket:message key="hostNameMessage"/></th> > > > <th><wicket:message key="macMessage"/></th> > > > <th><wicket:message key="reachable"/></th> > > > <th><wicket:message key="removeMessage"/></th> > > > <tbody> > > > <tr wicket:id="userDevicesListView"> > > > ... > > > </div> > > > > Upon the Ajax call the userDevicesListView is changed and devicesGroup is > > added to the target and should be rendered / repainted but it is not. > > > > > public void onClick(Optional<AjaxRequestTarget> target) { > > > Device deviceToRemove = (Device) getModelObject(); > > > try { > > > removeDevice(deviceToRemove, user); > > > info(deviceToRemove.getHostName() + " " + > > getString("device.removed")); > > > } catch (Exception e) { > > > > > > LOG.error("error while deleting" + > > deviceToRemove.getHostName(), e); > > > error(e); > > > > > > } > > > > > > target.get().add(devicesGroup); > > > target.get().add(feedbackPanel); > > > } > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > -- Regards - Ernesto Reinaldo Barreiro