Re: replaceWith method in Panel not working with AjaxLazyLoadPanel
Replace it it on the parent, then add the parent to the ajax target to be refreshed on the screen. ~ Thank you, Paul Bors On Feb 6, 2014, at 5:25 AM, Vishal Popat vishal_po...@hotmail.com wrote: Hi, I have the following panel layout: SomeOtherPanel AjaxLazyLoadPanel Panel loading with AjaxLazyLoadPanel PanelToReplace I am trying to replace PanelToReplace using replaceWith within IndicatingAjaxFallbackLink onClick method but I get the message: Component '[EmptyPanel [Component id = additionalInfo]]' with markupid: 'additionalInfo3e' not rendered because it was already removed from page. Using the same approach, I have replaced SomeOtherPanel which is not inside AjaxLazyLoadPanel and it works fine. So it seems I cannot use replaceWith when the Panel is within AjaxLazyLoadPanel. Is there an alternative way to do this? Regards Vishal - 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: replaceWith method in Panel not working with AjaxLazyLoadPanel
It seems you are adding the old/removed element to the ajax request target. You need to pass the new one instead. Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 12:19 PM, Vishal Popat vishal.po...@cipriati.co.ukwrote: Hi, I have the following panel layout: SomeOtherPanel AjaxLazyLoadPanel Panel loading with AjaxLazyLoadPanel PanelToReplace I am trying to replace PanelToReplace using replaceWith within IndicatingAjaxFallbackLink onClick method but I get the message: Component '[EmptyPanel [Component id = additionalInfo]]' with markupid: 'additionalInfo3e' not rendered because it was already removed from page. Using the same approach, I have replaced SomeOtherPanel which is not inside AjaxLazyLoadPanel and it works fine. So it seems I cannot use replaceWith when the Panel is within AjaxLazyLoadPanel. Is there an alternative way to do this? Regards Vishal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: replaceWith method in Panel not working with AjaxLazyLoadPanel
This is what I am doing: final Panel emptyPanel = new EmptyPanel(additionalInfo); emptyPanel.setOutputMarkupId(true); item.add(emptyPanel); IndicatingAjaxFallbackLink additionalInfoLink = new IndicatingAjaxFallbackLink(additionalInfoLink) { @Override public void onClick(AjaxRequestTarget target) { MyNewPanel info = new MyNewPanel(emptyPanel.getId()); emptyPanel.replaceWith(info); target.add(emptyPanel); } }; item.add(additionalInfoLink); I think this is correct? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/replaceWith-method-in-Panel-not-working-with-AjaxLazyLoadPanel-tp4664232p4664246.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: replaceWith method in Panel not working with AjaxLazyLoadPanel
On Thu, Feb 6, 2014 at 2:17 PM, vp143 vishal.po...@cipriati.co.uk wrote: This is what I am doing: final Panel emptyPanel = new EmptyPanel(additionalInfo); emptyPanel.setOutputMarkupId(true); item.add(emptyPanel); IndicatingAjaxFallbackLink additionalInfoLink = new IndicatingAjaxFallbackLink(additionalInfoLink) { @Override public void onClick(AjaxRequestTarget target) { MyNewPanel info = new MyNewPanel(emptyPanel.getId()); emptyPanel.replaceWith(info); target.add(emptyPanel); ^^ replace with: target.add(info); } }; item.add(additionalInfoLink); I think this is correct? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/replaceWith-method-in-Panel-not-working-with-AjaxLazyLoadPanel-tp4664232p4664246.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: replaceWith method in Panel not working with AjaxLazyLoadPanel
That was it! Thank you -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/replaceWith-method-in-Panel-not-working-with-AjaxLazyLoadPanel-tp4664232p4664257.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org