the modal dialog form is, but since the panel is rendered inside modal's parent initially the wicket form inside the modal should see the wicket form that the modal itself is in...
the rendered hierarchy should be like this form - wicket form modal window content panel div - wicket form inside the modal rendered as div instead of form now when modal is opened the content panel is reparented in dom body form - dom form created by modal js content panel div - wicket form inside the modal's content -igor On Thu, Feb 16, 2012 at 11:36 AM, Johan Compagner <jcompag...@gmail.com> wrote: > ok for a form inside a modal dialog > you need to override: > > /** > * @see org.apache.wicket.markup.html.form.Form#isRootForm() > */ > @Override > public boolean isRootForm() > { > return false; > } > > because the default behavior will ofcourse not find any other form because > the modal dialog form is just in javascript/html, its not a wicket > component.. > > > On Thu, Feb 16, 2012 at 20:22, Johan Compagner <jcompag...@gmail.com> wrote: > >> yes i just read that in a jira issue :) >> but in my example it doesn't ... >> will check it >> >> >> >> On Thu, Feb 16, 2012 at 20:20, Igor Vaynberg <igor.vaynb...@gmail.com>wrote: >> >>> the whole idea of putting the modal into a wicket form is that forms >>> inside the modal should change their form tags to divs because they >>> see they are inside another form... >>> >>> -igor >>> >>> On Thu, Feb 16, 2012 at 11:16 AM, Johan Compagner <jcompag...@gmail.com> >>> wrote: >>> > here: >>> > >>> > >>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html >>> > >>> > we say >>> > >>> > "If you want to use form in modal window component make sure that you >>> put >>> > the modal window itself in another form (nesting forms is legal in >>> Wicket) >>> > and that the form on modal window is submitted before the window get >>> > closed." >>> > >>> > problem is that this is illegal in the browser. >>> > And chrome some if i push through ajax new content in the modal dialog >>> that >>> > has that form >>> > completely removes the form from the resulting component tree.. >>> > >>> > I guess this is because the modal dialog generates a form tag itself, >>> and >>> > then also a form tag is generated in the content of the modal dialog >>> itself >>> > and chrome just filters that out? >>> > Weird thing is that chrome doesn't do that when you do a full page >>> > refresh... >>> > >>> > johan >>> >> >>