file uploads using ajax are not supported

-igor


On Jan 10, 2008 4:59 PM, Haritha Juturu <[EMAIL PROTECTED]> wrote:
> Hi Everyone
> I'm trying to upload a file using AjaxFormSubmitBehavior .
> When i submit the form , the defined onSubmit() method is not being called. 
> Can anyone tell me why this is happening ?
> Code given below:
> Java code is :
> Form f = new Form("f");
>         f.setOutputMarkupId(true);
>         f.setMultiPart(true);
>         f.setMaxSize(Bytes.MAX);
>         f.add(upload = new FileUploadField("fileInput"));
>         f.add(new Button("ok"));
>         f.add(new AjaxFormSubmitBehavior("onsubmit") {
>                 protected void onSubmit(AjaxRequestTarget target) {
>                     log.debug("inside onSubmit");
>                     FileUpload fileUpload = upload.getFileUpload();
>                     log.debug(fileUpload.getBytes());
>                 }
>
>                 @Override
>                 protected void onError(AjaxRequestTarget arg0) {
>                     // TODO Auto-generated method stub
>                 }
>         });
>
>         add(f);
>     }
>
>
> Form in the html file is :
>
>     <form id="uploadForm" wicket:id="f">
>         <fieldset>
>             <div>
>                 <input type="file" wicket:id="fileInput"/>
>                 <input wicket:id="ok" type="submit" value="Upload!"/>
>             </div>
>         </fieldset>
>     </form>
>
> Thanks
> Haritha
>
>
>
>
>       
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to