I see :) I have removed "form" dialog from the tab Maybe this report will help other users :)
Thanks for the hints :) On Tue, Jan 17, 2017 at 6:35 PM, Sebastien <seb...@gmail.com> wrote: > Hi Maxim, > > It seems that the dialog widget is not correctly *destroyed*, therefore the > new dialog that come in replacement cannot be re-wired. > > You can put a breakpoint in JQueryDestroyListener#onBeforeRespond to see > whether the dialog is taken into account in the destroy process. (I guess > not, because only directly targeted component are referenced here IIRC) > You can also look in the ajax-debug-window if you see the > jQuery('#mydialog').destroy() statement in the "priority-evaluate" section > (I guess not, too) > > Otherwise, you have other workarounds: > 1/ removing the dialog from the tab-panel :) > 2/ calling mydialog#destroy *before* the ajax call (tough an > AjaxCallListener, see #updateAjaxAttributes) > 3/ calling mydialog#destroy in the response, trough > handler.prependJavaScript(JQueryUtils.trycatch("jQuery(' > #mydialog').destroy()")); > - I would opt for this one. you can look at [1] > > Hope this helps, > Sebastien. > > [1] > https://github.com/sebfz1/wicket-jquery-ui/blob/master/ > wicket-jquery-ui/src/main/java/com/googlecode/wicket/ > jquery/ui/JQueryUIBehavior.java#L136 > > > > On Tue, Jan 17, 2017 at 11:50 AM, Maxim Solodovnik <solomax...@gmail.com> > wrote: > > > Hello Sebastien, > > > > I'm using jquery TabbedPanel. > > One of the panels contains jquery dialog with simple form (text field and > > one of the dialog buttons works as submit) > > I'm now getting weird component has been removed from page errors > > It seems > > > > tabs.reload(handler); > > > > re-creates the panel, but doesn't re-create dialog :( > > (dialog seems to be added to the <body> as hidden div, and not being > > updated) > > > > Is it possible? > > Are there any workarounds except removing dialog from the tab-panel? > > > > > > > > On Sun, Jan 15, 2017 at 12:30 AM, Sebastien <seb...@gmail.com> wrote: > > > > > Transferring to users@, I did not realized I reply to you only > Maxim... > > > > > > > > > ---------- Forwarded message ---------- > > > From: Maxim Solodovnik <solomax...@gmail.com> > > > Date: Sat, Jan 14, 2017 at 5:13 PM > > > Subject: Re: Reload TabbedPanel preserving active tab > > > To: Sebastien <seb...@gmail.com> > > > > > > > > > Thanks a lot Sebastien! > > > Works as expected :) > > > > > > On Sat, Jan 14, 2017 at 8:31 PM, Sebastien <seb...@gmail.com> wrote: > > > > > > > Oops, forgot something in the copy paste: > > > > > > > > this.tabPanel = new TabbedPanel("tabs", this.newTabModel()) { > > > >> > > > >> private IModel<Integer> indexModel = Model.of(-1); > > > >> > > > >> @Override > > > >> protected void onConfigure() > > > >> { > > > >> super.onConfigure(); > > > >> > > > >> int index = indexModel.getObject(); > > > >> > > > >> if (index > -1) // TODO eventually also check if the > > > >> corresponding tab is visible > > > >> { > > > >> this.setActiveTab(index); > > > >> } > > > >> } > > > >> > > > >> public void onActivate(AjaxRequestTarget target, int > > index, > > > >> ITab tab) > > > >> { > > > >> indexModel.setObject(index); > > > >> } > > > >> } > > > >> > > > > > > > > > > > > > > > > > > > > -- > > > WBR > > > Maxim aka solomax > > > > > > > > > > > -- > > WBR > > Maxim aka solomax > > > -- WBR Maxim aka solomax