If you use modal window with form you have to submit the form using AjaxButton - which rules out multipart form. Also when you have form in ModalWindow the window itself should be placed in Wicket Form. (forms can be nested) - which is stated in javascript.
-Matej On Fri, Jun 26, 2009 at 10:49 AM, Vladimir K<koval...@gmail.com> wrote: > > yes it do has. > > near line 1095 of modal.js: > > Wicket.Window.getMarkup = function(idWindow, idClassElement, idCaption, > idContent, idTop, idTopLeft, idTopRight, idLeft, idRight, idBottomLeft, > idBottomRight, idBottom, idCaptionText, isFrame) { > var s = > "<div class=\"wicket-modal\" id=\""+idWindow+"\" > style=\"top: 10px; left: > 10px; width: 100px;\"><form > style='background-color:transparent;padding:0px;margin:0px;border-width:0px;position:static'>"+ > "<div id=\""+idClassElement+"\">"+ > > And it seems hacky and buggy. > > In our case we would use regular submit for FileUploadField instead of ajax > if it wasn't hardcoded. Now we need to hack ModalWindow some way. I don't > like iframe approach 'cause it forces user to submit twice at the time when > regular submit should have worked. > > If you don't know this very hardcoded form leads to problem reflecting > request parameters to form components models because in java we have a stack > of forms and submit request contains just data of this particular form. As > the result form components of enclosing forms receive empty data and then > ... at least unexpected validation problems. > There has been a jira issue already that contains workaround description. I > have to go right now. I'll find it later. > > > igor.vaynberg wrote: >> >> modalwindow has a hardcoded form? >> >> >> On Thu, Jun 25, 2009 at 8:00 AM, Vladimir Kovalyuk<koval...@gmail.com> >> wrote: >>> How to turn ModalWindow form into multipart form? >>> The problem is that the markup code for that particular form is >>> hard-coded >>> into modal.js script (surprise!, surprise!). >>> >>> ModalWindow form submission problems han't been fixed yet, I mean rc5 >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/How-to-turn-ModalWindow-form-into-multipart-form--tp24204896p24216939.html > Sent from the Wicket - User 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org