>I'd forgotten that this was required on multipart forms: >f.setMultiPart(true);
Odd, I didn't call .setMultiPart(true); and I have no problem at all. On Mon, May 19, 2008 at 6:24 AM, Joel Halbert <[EMAIL PROTECTED]> wrote: > I am an idiot. > I'd forgotten that this was required on multipart forms: > f.setMultiPart(true); > > (hanging head in shame) > > -------------------------------------------------- > From: "Joel Halbert" <[EMAIL PROTECTED]> > Sent: Monday, May 19, 2008 2:10 PM > To: <[email protected]> > Subject: Re: Forn models not populated when using FileUploadField and > "multipart/form-data" .. ? > > I've identified that in the cases where this is working the request type >> Wicket creates to handle the form submission is a >> "MultipartServletWebRequest", and in those where it is not the request type >> is a standard "ServletWebRequest". >> >> The form markup on both pages looks the same.... >> >> Form that does work: >> <form id="addb" enctype="multipart/form-data" >> action="?wicket:bookmarkablePage=%3ARatingAdd&wicket:interface=%3A7%3Aadd%3A%3AIFormSubmitListener%3A%3A&bottomTab=0&topTab=0" >> method="post" wicket:id="add"> >> >> >> Form that doesn't work: >> <form id="register7" enctype="multipart/form-data" >> action="?wicket:bookmarkablePage=%3ARegisterUser&wicket:interface=%3A2%3Aregister%3A%3AIFormSubmitListener%3A%3A&bottomTab=0&topTab=0" >> method="post" wicket:id="register"> >> >> >> Any ideas why a ServletWebRequest would be used to handle a form of type >> "multipart" ? >> >> -------------------------------------------------- >> From: "Joel Halbert" <[EMAIL PROTECTED]> >> Sent: Monday, May 19, 2008 1:14 PM >> To: <[email protected]> >> Subject: Forn models not populated when using FileUploadField and >> "multipart/form-data" .. ? >> >> Hi, >>> >>> I'm experiencing a problem on a form whereby if I include a >>> "FileUploadField" in the form, causing the form encoding type to become >>> "multipart/form-data", none of the model objects from other fields on the >>> form are correctly populated when the form is submitted. Oddly enough we do >>> have other pages that do use "FileUploadField" with no problems, and I'm >>> unable to see any differences between the page that doesn't work and those >>> that do. >>> >>> Is there any obvious reason why model objects might not get populated >>> when the form enctype becomes "multipart/form-data" as is the case when >>> using a FileUploadField ? If i remove the FileUploadField from the form >>> everything works as expected. >>> >>> Thanks, >>> Joel >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
