Check https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/wicket-html5-parent/wicket-html5/src/main/java/org/wicketstuff/html5/fileapi and its examples. But this uses HTML5 APIs and wont work on your favorite Internet Explorer.
On Sun, Sep 4, 2011 at 7:35 PM, Christian Huber <hub...@butterbrot.org> wrote: > Not sure if I completely understand what you want to do but as far as I do I > guess the only way to do that is using java script. > > You could add a java script validation routine to the submit buttons onclick > handler that aborts submission when the input field has no value. > > Another approach could be to add a onchange handler for the input field. If > the field has a value set after a change the submit button gets enabled > otherwise it can be disabled. > > hth, Chris > > > The Sanity Resort <http://sanityresort.blogspot.com/> > > Am 04.09.2011 15:47, schrieb martin.ase...@mail.bg: >> >> >> Hello, guys, >> >> >> I've got a FileUploadField as so: >> >> >> image1UploadField = new FileUploadField("image1_upload", new Model()); >> >> >> I aim to know if the field has value set even before the form gets >> processed and the item gets uploaded. I want to minimize traffic and >> memory >> usage of my application. Therefore I don't want the file get uploaded >> before I know if there really was file specified. >> >> >> What's the most proper way to do this in Wicket code? >> >> >> Thank you in advance, >> Martin >> >> ------------------------------------- >> Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския >> пазар - 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна >> версия, SMS известяване и други. > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org