Hi,

please check the Ajax response in your browser's network tab, do you see the "devicesGroup" in the response XML?

Maybe that "devicesGroup" bound to a <wicket-container> tag?

Have fun
Sven


On 28.10.22 09:43, Laurent Duparchy 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: [email protected]
For additional commands, e-mail: [email protected]


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

Reply via email to