Attached is the patch that integrates the multipart upload processing into the Form class.
This is backwards compatible. Since I left the UploadForm there and depreciated it. I also made these changes: 1) FileUploadField supports an IModel, and if provided will update it during onUpdateModel 2) changed FileUploadField.getFileUpload to get the FileUpload item directly from the request - this allows you to get the uploaded file from Form.onSubmit (or wherever) even if the validation has failed - similar to how FormComponent.getInput works for the other form components. 3) added HiddenField - a simple subclass of TextField. This is handy when you have javascript that updates the form state before submitting. Cameron > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:wicket-develop- > [EMAIL PROTECTED] On Behalf Of Cameron Braid > Sent: Wednesday, 27 July 2005 3:07 AM > To: [email protected] > Subject: RE: [Wicket-develop] Forms and MultiPart Forms > > I guess you mean patCh if it passes the vote ? > > Sure. > > Cameron. > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:wicket-develop- > > [EMAIL PROTECTED] On Behalf Of Eelco Hillenius > > Sent: Wednesday, 27 July 2005 3:04 AM > > To: [email protected] > > Subject: Re: [Wicket-develop] Forms and MultiPart Forms > > > > Sounds like good reasons to me. Can we have a vote on this (it's another > > API breaker)? And could you provide a path if it passes? > > > > I'm +1. > > > > Eelco > > > > > > > > > >Yes and No... I think that just because a file upload input contains > non > > >string data, it shouldn't require a special type of form - just because > > the > > >http protocol has dictated that this is technically how this is done. > > > > > >Fair enough that we want to prevent certain forms from receiving > > multipart > > >data, and to be able to constrain the size of this data, however when > it > > >comes down to it .. it's a form. > > > > > >In my mind, all forms could potentially be upload forms. > > > > > >In my case - I have implemented a few subclasses of Form > > > > > >- an EntityForm which automatically builds a model from a data source > > >- a GridForm which automatically builds a list model from a datasource > > >Both of which have custom onSubmit and validate overrides. > > > > > >Now - I will need to create my own subclass of wicket.m.h.Form that > uses > > >delegation to handle the uploading side of things, then subclass it > with > > >EntityForm and GridForm - and possibly any future custom form > > >implementations that I have. Hence the w.m.h.UploadForm component is > not > > >useful. > > > > > >I would assume that others would want to create their own subclasses of > > >wicket.m.h.Form, and will probably one day want to support file uploads > > with > > >them too. > > > > > >Cameron > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > informative Webcasts and more! Get everything you need to get up to > > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > _______________________________________________ > > Wicket-develop mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/wicket-develop > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Wicket-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-develop
wicket-form-uploadAndHidden.patch
Description: Binary data
