Re: Ajax - component not rendered.
Steps to create Mini application are here: https://wicket.apache.org/start/quickstart.html :)) On Tue, 8 Nov 2022 at 15:01, Martin Grigorov wrote: > Hi, > > Please try to reproduce the problem in a mini application and share it > with us! > > On Tue, Nov 8, 2022 at 9:41 AM Laurent Duparchy wrote: > >> Hi, >> >> I got rid of this javascript error, that was due to incorrect design, I >> think. >> >> devicesGroup is a CheckGroup >> >> devicesGroup = new CheckGroup("devicesGroup", new ArrayList()) { >> @Override >> public boolean isVisible() { >> super.isVisible(); >>. >> }; >> }; >> >> >> >> but it contained also what seems to be a useless CheckGroupSelector. >> >> // devicesGroup.add(new CheckGroupSelector("devicesGroupSelector")); >> >> >> So, the javascript error is gone but the Ajax rendering is still flawed. >> >> When I add both feedbackpanel and devicesGroup, nothing is rendered the >> Ajax response is as follow >> >> >> >> id5 being the feedbackpanel (which is empty in the response) >> id7 being the devicesGroup which still contains the deleted line. >> >> All in all, this response does not take into account the added component >> for repainting. I added them to the Ajax "target" but perhaps I need to add >> them to a "parent" ? >> >> I recall that if I add only the feedbackpanel for Ajax rendering, it is >> well painted. >> >> generated markup : >> >> > id="header">WakeOnLan Utility Utility to >> start / wake up a computer > id="signOut">Sign Out >> >> > action="./?6-2.-wakeUpForm">> class="hidden-fields"> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* >> Martin Grigorov wrote on 07/11/2022 20:57: >> >> Hi Laurent, >> >> The problem is the JavaScript error: Uncaught TypeError: b is null. >> >> It seems there is some bug in >> "Wicket.CheckboxSelector.updateSelectorState(c,e)},initializeSelector:function(c,d){var >> b=document.getElementById(c); ..." >> >> Due to this JS error Wicket cannot replace neither the feedback panel nor >> any other component. >> >> You should focus on debugging the JavaScript. If you don't know how to do >> it then please create a quickstart app that reproduces the problem and >> share it with us. >> >> >> On Mon, Nov 7, 2022 at 6:37 PM Laurent Duparchy >> wrote: >> >> >> If I add the entire page (which is defeating the entire "Ajax" idea I >> think.), it works. The new list is painted >> > target.get().add(getPage()); >> >> If I add only the feedback panel, it is is painted. >> > target.get().add(feedbackPanel); >> >> If I add both, the feedbackpanel is not painted... Go figure. >> >> I probably don't understand what a "target" is and I'm giving up that. >> Sorry for being an annoyance. >> >> >> *Laurent Duparchy >> ESRF - The European Synchrotron >> MIS Unit >> 04 76 88 22 56* >> Laurent Duparchy wrote on 03/11/2022 10:11: >> >> Yes I corrected that HTML too. (which was auto-corrected by browsers I >> >> think, at least by Firefox). >> >> I looked for errors in Firefox debugger. The console reports a warning >> >> then an error in a generated js : >> >> Warning : >> >> jQuery.Deferred exception: b is null updateSelectorState@ >> >> https://xx/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:392 >> attachUpdateHandlers@https://xx.esrf.fr/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:598 >> >> Error : >> >> >> Uncaught TypeError: b is null >> >> in >> >> >> >> (function(a){if(typeof(Wicket.CheckboxSelector)==="object"){return}Wicket.CheckboxSelector={updateAllCheckboxes:function(f,e){var >> d=e();for(var b=0;b> c=d[b];if(c.checked!==f){c.click()}}},updateSelectorState:function(e,g){var >> f=g(),c=f.length>0;for(var >> d=0;d> b=document.getElementById(e);b.checked=c},attachUpdateHandlers:function(c,e){var >> d=e(),f=function(){Wicket.CheckboxSelector.updateSelectorState(c,e)};for(var >> b=0;b> b=document.getElementById(c);Wicket.Event.add(b,"click",function(){Wicket.CheckboxSelector.updateAllCheckboxes(b.checked,d)})},findCheckboxesFunction:function(c,b){return >> function(){var d=[];var >> g=document.getElementById(c).getElementsByTagName("input");for(var >> e=0;e> >> d}},getCheckboxesFunction:function(b){return function(){var >> >> c=[];for(var e=0;e> d=document.getElementById(b[e]);if(d){c.push(d)}}return c)(); >> >> *Laurent Duparchy >> ESRF - The European Synchrotron >> MIS Unit >> 04 76 88 22 56* >> Sven Meier wrote on 03/11/2022 09:38: >> >> That HTML doesn't look
Re: Ajax - component not rendered.
Hi, Please try to reproduce the problem in a mini application and share it with us! On Tue, Nov 8, 2022 at 9:41 AM Laurent Duparchy wrote: > Hi, > > I got rid of this javascript error, that was due to incorrect design, I > think. > > devicesGroup is a CheckGroup > > devicesGroup = new CheckGroup("devicesGroup", new ArrayList()) { > @Override > public boolean isVisible() { > super.isVisible(); >. > }; > }; > > > > but it contained also what seems to be a useless CheckGroupSelector. > > // devicesGroup.add(new CheckGroupSelector("devicesGroupSelector")); > > > So, the javascript error is gone but the Ajax rendering is still flawed. > > When I add both feedbackpanel and devicesGroup, nothing is rendered the > Ajax response is as follow > > > > id5 being the feedbackpanel (which is empty in the response) > id7 being the devicesGroup which still contains the deleted line. > > All in all, this response does not take into account the added component > for repainting. I added them to the Ajax "target" but perhaps I need to add > them to a "parent" ? > > I recall that if I add only the feedbackpanel for Ajax rendering, it is > well painted. > > generated markup : > >id="header">WakeOnLan Utility Utility to > start / wake up a computer href="./?6-2.-signOut">Sign Out id="feedbackContainer"> > action="./?6-2.-wakeUpForm"> class="hidden-fields"> > > > > > > > > > > > > > > > *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* > Martin Grigorov wrote on 07/11/2022 20:57: > > Hi Laurent, > > The problem is the JavaScript error: Uncaught TypeError: b is null. > > It seems there is some bug in > "Wicket.CheckboxSelector.updateSelectorState(c,e)},initializeSelector:function(c,d){var > b=document.getElementById(c); ..." > > Due to this JS error Wicket cannot replace neither the feedback panel nor > any other component. > > You should focus on debugging the JavaScript. If you don't know how to do > it then please create a quickstart app that reproduces the problem and > share it with us. > > > On Mon, Nov 7, 2022 at 6:37 PM Laurent Duparchy > wrote: > > > If I add the entire page (which is defeating the entire "Ajax" idea I > think.), it works. The new list is painted > > target.get().add(getPage()); > > If I add only the feedback panel, it is is painted. > > target.get().add(feedbackPanel); > > If I add both, the feedbackpanel is not painted... Go figure. > > I probably don't understand what a "target" is and I'm giving up that. > Sorry for being an annoyance. > > > *Laurent Duparchy > ESRF - The European Synchrotron > MIS Unit > 04 76 88 22 56* > Laurent Duparchy wrote on 03/11/2022 10:11: > > Yes I corrected that HTML too. (which was auto-corrected by browsers I > > think, at least by Firefox). > > I looked for errors in Firefox debugger. The console reports a warning > > then an error in a generated js : > > Warning : > > jQuery.Deferred exception: b is null updateSelectorState@ > > https://xx/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:392 > attachUpdateHandlers@https://xx.esrf.fr/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:598 > > Error : > > > Uncaught TypeError: b is null > > in > > > > (function(a){if(typeof(Wicket.CheckboxSelector)==="object"){return}Wicket.CheckboxSelector={updateAllCheckboxes:function(f,e){var > d=e();for(var b=0;b c=d[b];if(c.checked!==f){c.click()}}},updateSelectorState:function(e,g){var > f=g(),c=f.length>0;for(var > d=0;d b=document.getElementById(e);b.checked=c},attachUpdateHandlers:function(c,e){var > d=e(),f=function(){Wicket.CheckboxSelector.updateSelectorState(c,e)};for(var > b=0;b b=document.getElementById(c);Wicket.Event.add(b,"click",function(){Wicket.CheckboxSelector.updateAllCheckboxes(b.checked,d)})},findCheckboxesFunction:function(c,b){return > function(){var d=[];var > g=document.getElementById(c).getElementsByTagName("input");for(var > e=0;e > d}},getCheckboxesFunction:function(b){return function(){var > > c=[];for(var e=0;e d=document.getElementById(b[e]);if(d){c.push(d)}}return c)(); > > *Laurent Duparchy > ESRF - The European Synchrotron > MIS Unit > 04 76 88 22 56* > Sven Meier wrote on 03/11/2022 09:38: > > That HTML doesn't look valid to me: > > Your THs belong inside a TR, and while you're at it move that one into > > a THEAD. > > https://www.w3schools.com/tags/tag_th.asp > > Maybe this is just a problem with replacing the HTML in the browser, > > this is why I adviced you to check the response of the Ajax
Re: Ajax - component not rendered.
Hi, I got rid of this javascript error, that was due to incorrect design, I think. devicesGroup is a CheckGroup devicesGroup = new CheckGroup("devicesGroup", new ArrayList()) { @Override public boolean isVisible() { super.isVisible(); . }; }; but it contained also what seems to be a useless CheckGroupSelector. // devicesGroup.add(new CheckGroupSelector("devicesGroupSelector")); So, the javascript error is gone but the Ajax rendering is still flawed. When I add both feedbackpanel and devicesGroup, nothing is rendered the Ajax response is as follow id5 being the feedbackpanel (which is empty in the response) id7 being the devicesGroup which still contains the deleted line. All in all, this response does not take into account the added component for repainting. I added them to the Ajax "target" but perhaps I need to add them to a "parent" ? I recall that if I add only the feedbackpanel for Ajax rendering, it is well painted. generated markup : WakeOnLan Utility Utility to start / wake up a computerSign Out *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Martin Grigorov wrote on 07/11/2022 20:57: Hi Laurent, The problem is the JavaScript error: Uncaught TypeError: b is null. It seems there is some bug in "Wicket.CheckboxSelector.updateSelectorState(c,e)},initializeSelector:function(c,d){var b=document.getElementById(c); ..." Due to this JS error Wicket cannot replace neither the feedback panel nor any other component. You should focus on debugging the JavaScript. If you don't know how to do it then please create a quickstart app that reproduces the problem and share it with us. On Mon, Nov 7, 2022 at 6:37 PM Laurent Duparchy wrote: If I add the entire page (which is defeating the entire "Ajax" idea I think.), it works. The new list is painted > target.get().add(getPage()); If I add only the feedback panel, it is is painted. > target.get().add(feedbackPanel); If I add both, the feedbackpanel is not painted... Go figure. I probably don't understand what a "target" is and I'm giving up that. Sorry for being an annoyance. *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Laurent Duparchy wrote on 03/11/2022 10:11: Yes I corrected that HTML too. (which was auto-corrected by browsers I think, at least by Firefox). I looked for errors in Firefox debugger. The console reports a warning then an error in a generated js : Warning : jQuery.Deferred exception: b is null updateSelectorState@ https://xx/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:392 attachUpdateHandlers@ https://xx.esrf.fr/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:598 Error : Uncaught TypeError: b is null in (function(a){if(typeof(Wicket.CheckboxSelector)==="object"){return}Wicket.CheckboxSelector={updateAllCheckboxes:function(f,e){var d=e();for(var b=0;b0;for(var d=0;d d}},getCheckboxesFunction:function(b){return function(){var c=[];for(var e=0;e *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Sven Meier wrote on 03/11/2022 09:38: That HTML doesn't look valid to me: Your THs belong inside a TR, and while you're at it move that one into a THEAD. https://www.w3schools.com/tags/tag_th.asp Maybe this is just a problem with replacing the HTML in the browser, this is why I adviced you to check the response of the Ajax request in the Browser network tab. Sven On 03.11.22 08:11, Laurent Duparchy wrote: You need more than that ? ... *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Sven Meier wrote on 02/11/2022 17:38: Show us the relevant markup please. Sven On 02.11.22 15:13, Laurent Duparchy wrote: Hi, Yes, *devicesGroup *is initially visible. Everything seems fine in terms of Ajax request/response. When I add only the *feedbackpanel*, it is correctly added and painted with the correct feedback message When I add *devicesGroup*, nothing is repainted, including the *feedbackpanel*. I tried to add only the *userDevicesListView *for repaint, but there is an error saying that it's not possible to add a repeater and to add its parent... which is devicesGroup. There's probably a flaw in the devicesGroup design. Basically it contains a list of items w/ two possible ajax action : "check" and "delete". "Check" will only gives a result in the feedback panel and is working fine. "Delete" will, you guessed, delete the item and repaint the list. The item is truly
Re: Ajax - component not rendered.
Hi Laurent, The problem is the JavaScript error: Uncaught TypeError: b is null. It seems there is some bug in "Wicket.CheckboxSelector.updateSelectorState(c,e)},initializeSelector:function(c,d){var b=document.getElementById(c); ..." Due to this JS error Wicket cannot replace neither the feedback panel nor any other component. You should focus on debugging the JavaScript. If you don't know how to do it then please create a quickstart app that reproduces the problem and share it with us. On Mon, Nov 7, 2022 at 6:37 PM Laurent Duparchy wrote: > If I add the entire page (which is defeating the entire "Ajax" idea I > think.), it works. The new list is painted > > target.get().add(getPage()); > > If I add only the feedback panel, it is is painted. > > target.get().add(feedbackPanel); > > If I add both, the feedbackpanel is not painted... Go figure. > > I probably don't understand what a "target" is and I'm giving up that. > Sorry for being an annoyance. > > > *Laurent Duparchy > ESRF - The European Synchrotron > MIS Unit > 04 76 88 22 56* > Laurent Duparchy wrote on 03/11/2022 10:11: > > Yes I corrected that HTML too. (which was auto-corrected by browsers I > think, at least by Firefox). > > > > I looked for errors in Firefox debugger. The console reports a warning > then an error in a generated js : > > > > Warning : > >> jQuery.Deferred exception: b is null updateSelectorState@ > https://xx/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:392 > attachUpdateHandlers@ > https://xx.esrf.fr/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:598 > > > > Error : > > > >> Uncaught TypeError: b is null > >> > >> in > >> > >> > (function(a){if(typeof(Wicket.CheckboxSelector)==="object"){return}Wicket.CheckboxSelector={updateAllCheckboxes:function(f,e){var > d=e();for(var b=0;b c=d[b];if(c.checked!==f){c.click()}}},updateSelectorState:function(e,g){var > f=g(),c=f.length>0;for(var > d=0;d b=document.getElementById(e);b.checked=c},attachUpdateHandlers:function(c,e){var > d=e(),f=function(){Wicket.CheckboxSelector.updateSelectorState(c,e)};for(var > b=0;b b=document.getElementById(c);Wicket.Event.add(b,"click",function(){Wicket.CheckboxSelector.updateAllCheckboxes(b.checked,d)})},findCheckboxesFunction:function(c,b){return > function(){var d=[];var > g=document.getElementById(c).getElementsByTagName("input");for(var > e=0;e >> d}},getCheckboxesFunction:function(b){return function(){var > c=[];for(var e=0;e d=document.getElementById(b[e]);if(d){c.push(d)}}return c)(); > > > > > > > > > > *Laurent Duparchy > > ESRF - The European Synchrotron > > MIS Unit > > 04 76 88 22 56* > > Sven Meier wrote on 03/11/2022 09:38: > >> That HTML doesn't look valid to me: > >> > >> Your THs belong inside a TR, and while you're at it move that one into > a THEAD. > >> > >> https://www.w3schools.com/tags/tag_th.asp > >> > >> Maybe this is just a problem with replacing the HTML in the browser, > this is why I adviced you to check the response of the Ajax request in the > Browser network tab. > >> > >> Sven > >> > >> > >> On 03.11.22 08:11, Laurent Duparchy wrote: > >>> You need more than that ? > >>> > > > > > > > > > > > > > ... > > >>> > >>> > >>> > >>> *Laurent Duparchy > >>> ESRF - The European Synchrotron > >>> MIS Unit > >>> 04 76 88 22 56* > >>> Sven Meier wrote on 02/11/2022 17:38: > Show us the relevant markup please. > > Sven > > > On 02.11.22 15:13, Laurent Duparchy wrote: > > Hi, > > > > Yes, *devicesGroup *is initially visible. Everything seems fine in > terms of Ajax request/response. > > > > When I add only the *feedbackpanel*, it is correctly added and > painted with the correct feedback message > > When I add *devicesGroup*, nothing is repainted, including the > *feedbackpanel*. > > > > I tried to add only the *userDevicesListView *for repaint, but there > is an error saying that it's not possible to add a repeater and to add its > parent... which is devicesGroup. > > > > There's probably a flaw in the devicesGroup design. Basically it > contains a list of items w/ two possible ajax action : "check" and "delete". > > > > "Check" will only gives a result in the feedback panel and is > working fine. > > "Delete" will, you guessed, delete the item and repaint the list. > The item is truly deleted, in the database and /userDevices /list is > reloaded. > > > > > > it is designed as follow (worked fined w/ Wicket 1.4) > > / > > private class
Re: Ajax - component not rendered.
If I add the entire page (which is defeating the entire "Ajax" idea I think.), it works. The new list is painted > target.get().add(getPage()); If I add only the feedback panel, it is is painted. > target.get().add(feedbackPanel); If I add both, the feedbackpanel is not painted... Go figure. I probably don't understand what a "target" is and I'm giving up that. Sorry for being an annoyance. *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Laurent Duparchy wrote on 03/11/2022 10:11: Yes I corrected that HTML too. (which was auto-corrected by browsers I think, at least by Firefox). I looked for errors in Firefox debugger. The console reports a warning then an error in a generated js : Warning : jQuery.Deferred exception: b is null updateSelectorState@https://xx/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:392 attachUpdateHandlers@https://xx.esrf.fr/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:598 Error : Uncaught TypeError: b is null in (function(a){if(typeof(Wicket.CheckboxSelector)==="object"){return}Wicket.CheckboxSelector={updateAllCheckboxes:function(f,e){var d=e();for(var b=0;b0;for(var d=0;dd}},getCheckboxesFunction:function(b){return function(){var c=[];for(var e=0;e *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Sven Meier wrote on 03/11/2022 09:38: That HTML doesn't look valid to me: Your THs belong inside a TR, and while you're at it move that one into a THEAD. https://www.w3schools.com/tags/tag_th.asp Maybe this is just a problem with replacing the HTML in the browser, this is why I adviced you to check the response of the Ajax request in the Browser network tab. Sven On 03.11.22 08:11, Laurent Duparchy wrote: You need more than that ? ... *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Sven Meier wrote on 02/11/2022 17:38: Show us the relevant markup please. Sven On 02.11.22 15:13, Laurent Duparchy wrote: Hi, Yes, *devicesGroup *is initially visible. Everything seems fine in terms of Ajax request/response. When I add only the *feedbackpanel*, it is correctly added and painted with the correct feedback message When I add *devicesGroup*, nothing is repainted, including the *feedbackpanel*. I tried to add only the *userDevicesListView *for repaint, but there is an error saying that it's not possible to add a repeater and to add its parent... which is devicesGroup. There's probably a flaw in the devicesGroup design. Basically it contains a list of items w/ two possible ajax action : "check" and "delete". "Check" will only gives a result in the feedback panel and is working fine. "Delete" will, you guessed, delete the item and repaint the list. The item is truly deleted, in the database and /userDevices /list is reloaded. it is designed as follow (worked fined w/ Wicket 1.4) / private class UserDevicesLoadableDetachableModel extends LoadableDetachableModel { private List userDevices ; ... } private class UserDevicesListView extends ListView { public UserDevicesListView(String id, UserDevicesLoadableDetachableModel imodel) { super(id, imodel); } ... } / /userDevicesListView = new UserDevicesListView("userDevicesListView", userDevicesLoadableDetachableModel);// / /devicesGroup = new CheckGroup("devicesGroup", new ArrayList<>()){// // public boolean isVisible() {...}// //} / /devicesGroup.setOutputMarkupId(true);// //devicesGroup.setOutputMarkupPlaceholderTag(true);// //devicesGroup.setRenderBodyOnly(false);// //devicesGroup.add(new CheckGroupSelector("devicesGroupSelector"));// //devicesGroup.add(userDevicesListView);// // // / *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Ernesto Reinaldo Barreiro wrote on 29/10/2022 04:06: 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 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 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
Re: Ajax - component not rendered.
Yes I corrected that HTML too. (which was auto-corrected by browsers I think, at least by Firefox). I looked for errors in Firefox debugger. The console reports a warning then an error in a generated js : Warning : jQuery.Deferred exception: b is null updateSelectorState@https://xx/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:392 attachUpdateHandlers@https://xx.esrf.fr/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:598 Error : Uncaught TypeError: b is null in (function(a){if(typeof(Wicket.CheckboxSelector)==="object"){return}Wicket.CheckboxSelector={updateAllCheckboxes:function(f,e){var d=e();for(var b=0;b0;for(var d=0;dd}},getCheckboxesFunction:function(b){return function(){var c=[];for(var e=0;e *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Sven Meier wrote on 03/11/2022 09:38: That HTML doesn't look valid to me: Your THs belong inside a TR, and while you're at it move that one into a THEAD. https://www.w3schools.com/tags/tag_th.asp Maybe this is just a problem with replacing the HTML in the browser, this is why I adviced you to check the response of the Ajax request in the Browser network tab. Sven On 03.11.22 08:11, Laurent Duparchy wrote: You need more than that ? ... *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Sven Meier wrote on 02/11/2022 17:38: Show us the relevant markup please. Sven On 02.11.22 15:13, Laurent Duparchy wrote: Hi, Yes, *devicesGroup *is initially visible. Everything seems fine in terms of Ajax request/response. When I add only the *feedbackpanel*, it is correctly added and painted with the correct feedback message When I add *devicesGroup*, nothing is repainted, including the *feedbackpanel*. I tried to add only the *userDevicesListView *for repaint, but there is an error saying that it's not possible to add a repeater and to add its parent... which is devicesGroup. There's probably a flaw in the devicesGroup design. Basically it contains a list of items w/ two possible ajax action : "check" and "delete". "Check" will only gives a result in the feedback panel and is working fine. "Delete" will, you guessed, delete the item and repaint the list. The item is truly deleted, in the database and /userDevices /list is reloaded. it is designed as follow (worked fined w/ Wicket 1.4) / private class UserDevicesLoadableDetachableModel extends LoadableDetachableModel { private List userDevices ; ... } private class UserDevicesListView extends ListView { public UserDevicesListView(String id, UserDevicesLoadableDetachableModel imodel) { super(id, imodel); } ... } / /userDevicesListView = new UserDevicesListView("userDevicesListView", userDevicesLoadableDetachableModel);// / /devicesGroup = new CheckGroup("devicesGroup", new ArrayList<>()){// // public boolean isVisible() {...}// //} / /devicesGroup.setOutputMarkupId(true);// //devicesGroup.setOutputMarkupPlaceholderTag(true);// //devicesGroup.setRenderBodyOnly(false);// //devicesGroup.add(new CheckGroupSelector("devicesGroupSelector"));// //devicesGroup.add(userDevicesListView);// // // / *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Ernesto Reinaldo Barreiro wrote on 29/10/2022 04:06: 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 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 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. ... 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 target)
Re: Ajax - component not rendered.
Hi, good catch, but unfortunately removing that surrounding did not solve the problem. Checking the *generated *markup for , I see that it is translated and the id is changed, so it does not seems to create a collision to use same wicket:id as another id, even though it may be confusing for reading and debugging. *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Dirk Forchel wrote on 03/11/2022 08:19: Hi Laurent, I've noticed that you use the same markup ID 'wakeUpForm' twice. Maybe that's the reason for some Ajax problems. Dirk Am 28/10/2022 um 09:43 schrieb Laurent Duparchy: 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. ... 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 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax - component not rendered.
That HTML doesn't look valid to me: Your THs belong inside a TR, and while you're at it move that one into a THEAD. https://www.w3schools.com/tags/tag_th.asp Maybe this is just a problem with replacing the HTML in the browser, this is why I adviced you to check the response of the Ajax request in the Browser network tab. Sven On 03.11.22 08:11, Laurent Duparchy wrote: You need more than that ? ... *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Sven Meier wrote on 02/11/2022 17:38: Show us the relevant markup please. Sven On 02.11.22 15:13, Laurent Duparchy wrote: Hi, Yes, *devicesGroup *is initially visible. Everything seems fine in terms of Ajax request/response. When I add only the *feedbackpanel*, it is correctly added and painted with the correct feedback message When I add *devicesGroup*, nothing is repainted, including the *feedbackpanel*. I tried to add only the *userDevicesListView *for repaint, but there is an error saying that it's not possible to add a repeater and to add its parent... which is devicesGroup. There's probably a flaw in the devicesGroup design. Basically it contains a list of items w/ two possible ajax action : "check" and "delete". "Check" will only gives a result in the feedback panel and is working fine. "Delete" will, you guessed, delete the item and repaint the list. The item is truly deleted, in the database and /userDevices /list is reloaded. it is designed as follow (worked fined w/ Wicket 1.4) / private class UserDevicesLoadableDetachableModel extends LoadableDetachableModel { private List userDevices ; ... } private class UserDevicesListView extends ListView { public UserDevicesListView(String id, UserDevicesLoadableDetachableModel imodel) { super(id, imodel); } ... } / /userDevicesListView = new UserDevicesListView("userDevicesListView", userDevicesLoadableDetachableModel);// / /devicesGroup = new CheckGroup("devicesGroup", new ArrayList<>()){// // public boolean isVisible() {...}// //} / /devicesGroup.setOutputMarkupId(true);// //devicesGroup.setOutputMarkupPlaceholderTag(true);// //devicesGroup.setRenderBodyOnly(false);// //devicesGroup.add(new CheckGroupSelector("devicesGroupSelector"));// //devicesGroup.add(userDevicesListView);// // // / *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Ernesto Reinaldo Barreiro wrote on 29/10/2022 04:06: 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 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 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. ... 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 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail:
Re: Ajax - component not rendered.
Hi Laurent, I've noticed that you use the same markup ID 'wakeUpForm' twice. Maybe that's the reason for some Ajax problems. Dirk Am 28/10/2022 um 09:43 schrieb Laurent Duparchy: 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. ... 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 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax - component not rendered.
You need more than that ? ... *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Sven Meier wrote on 02/11/2022 17:38: Show us the relevant markup please. Sven On 02.11.22 15:13, Laurent Duparchy wrote: Hi, Yes, *devicesGroup *is initially visible. Everything seems fine in terms of Ajax request/response. When I add only the *feedbackpanel*, it is correctly added and painted with the correct feedback message When I add *devicesGroup*, nothing is repainted, including the *feedbackpanel*. I tried to add only the *userDevicesListView *for repaint, but there is an error saying that it's not possible to add a repeater and to add its parent... which is devicesGroup. There's probably a flaw in the devicesGroup design. Basically it contains a list of items w/ two possible ajax action : "check" and "delete". "Check" will only gives a result in the feedback panel and is working fine. "Delete" will, you guessed, delete the item and repaint the list. The item is truly deleted, in the database and /userDevices /list is reloaded. it is designed as follow (worked fined w/ Wicket 1.4) / private class UserDevicesLoadableDetachableModel extends LoadableDetachableModel { private List userDevices ; ... } private class UserDevicesListView extends ListView { public UserDevicesListView(String id, UserDevicesLoadableDetachableModel imodel) { super(id, imodel); } ... } / /userDevicesListView = new UserDevicesListView("userDevicesListView", userDevicesLoadableDetachableModel);// / /devicesGroup = new CheckGroup("devicesGroup", new ArrayList<>()){// // public boolean isVisible() {...}// //} / /devicesGroup.setOutputMarkupId(true);// //devicesGroup.setOutputMarkupPlaceholderTag(true);// //devicesGroup.setRenderBodyOnly(false);// //devicesGroup.add(new CheckGroupSelector("devicesGroupSelector"));// //devicesGroup.add(userDevicesListView);// // // / *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Ernesto Reinaldo Barreiro wrote on 29/10/2022 04:06: 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 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 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. ... 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 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax - component not rendered.
Show us the relevant markup please. Sven On 02.11.22 15:13, Laurent Duparchy wrote: Hi, Yes, *devicesGroup *is initially visible. Everything seems fine in terms of Ajax request/response. When I add only the *feedbackpanel*, it is correctly added and painted with the correct feedback message When I add *devicesGroup*, nothing is repainted, including the *feedbackpanel*. I tried to add only the *userDevicesListView *for repaint, but there is an error saying that it's not possible to add a repeater and to add its parent... which is devicesGroup. There's probably a flaw in the devicesGroup design. Basically it contains a list of items w/ two possible ajax action : "check" and "delete". "Check" will only gives a result in the feedback panel and is working fine. "Delete" will, you guessed, delete the item and repaint the list. The item is truly deleted, in the database and /userDevices /list is reloaded. it is designed as follow (worked fined w/ Wicket 1.4) / private class UserDevicesLoadableDetachableModel extends LoadableDetachableModel { private List userDevices ; ... } private class UserDevicesListView extends ListView { public UserDevicesListView(String id, UserDevicesLoadableDetachableModel imodel) { super(id, imodel); } ... } / /userDevicesListView = new UserDevicesListView("userDevicesListView", userDevicesLoadableDetachableModel);// / /devicesGroup = new CheckGroup("devicesGroup", new ArrayList<>()){// // public boolean isVisible() {...}// //} / /devicesGroup.setOutputMarkupId(true);// //devicesGroup.setOutputMarkupPlaceholderTag(true);// //devicesGroup.setRenderBodyOnly(false);// //devicesGroup.add(new CheckGroupSelector("devicesGroupSelector"));// //devicesGroup.add(userDevicesListView);// // // / *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Ernesto Reinaldo Barreiro wrote on 29/10/2022 04:06: 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 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 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. ... 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 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax - component not rendered.
Hi, Yes, *devicesGroup *is initially visible. Everything seems fine in terms of Ajax request/response. When I add only the *feedbackpanel*, it is correctly added and painted with the correct feedback message When I add *devicesGroup*, nothing is repainted, including the *feedbackpanel*. I tried to add only the *userDevicesListView *for repaint, but there is an error saying that it's not possible to add a repeater and to add its parent... which is devicesGroup. There's probably a flaw in the devicesGroup design. Basically it contains a list of items w/ two possible ajax action : "check" and "delete". "Check" will only gives a result in the feedback panel and is working fine. "Delete" will, you guessed, delete the item and repaint the list. The item is truly deleted, in the database and /userDevices /list is reloaded. it is designed as follow (worked fined w/ Wicket 1.4) / private class UserDevicesLoadableDetachableModel extends LoadableDetachableModel { private List userDevices ; ... } private class UserDevicesListView extends ListView { public UserDevicesListView(String id, UserDevicesLoadableDetachableModel imodel) { super(id, imodel); } ... } / /userDevicesListView = new UserDevicesListView("userDevicesListView", userDevicesLoadableDetachableModel);// / /devicesGroup = new CheckGroup("devicesGroup", new ArrayList<>()){// // public boolean isVisible() {...}// //} / /devicesGroup.setOutputMarkupId(true);// //devicesGroup.setOutputMarkupPlaceholderTag(true);// //devicesGroup.setRenderBodyOnly(false);// //devicesGroup.add(new CheckGroupSelector("devicesGroupSelector"));// //devicesGroup.add(userDevicesListView);// // // / *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56* Ernesto Reinaldo Barreiro wrote on 29/10/2022 04:06: 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 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 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. ... 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 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
Re: Ajax - component not rendered.
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 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 > 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. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ... > > > > > > > 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 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
Re: Ajax - component not rendered.
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 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. > > > > > > > > > > > > > > > > > > > > > > > > > > > ... > > > > 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 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 > >
Re: Ajax - component not rendered.
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 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. ... 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 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Ajax - component not rendered.
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. ... 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 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