if u check the file upload example in wicket site u can see this . any way
the only having a file upload so no probs but my form also contains some
text fields
thanks
bhupat

On 8/29/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> upload.getfileupload() ?
>
> -igor
>
>
> On 8/28/07, bhupat parmar <[EMAIL PROTECTED]> wrote:
> >
> > hi
> > my code goes like this
> >
> >
> >     private static class TabPanel3 extends Panel
> >     {
> >         FileUploadField fileUploadField = null;
> >         TextField styleNameTFld=null;
> >         private String message = "";
> >         /** available sites for the multiple select. */
> >         private static final List SITES =
> >             Arrays.asList(new String[] { "The Server Side", "Java
> Lobby","
> > Java.Net" });
> >
> >         public TabPanel3(String id)
> >         {
> >             super(id);
> >             final FileUploadForm simpleUploadForm = new
> > FileUploadForm("simpleUpload");
> >
> >             add(simpleUploadForm);
> >         }
> >         private class FileUploadForm extends Form
> >         {
> >             private FileUploadField fileUploadField;
> >             private TextField styleNameTFld;
> >
> >             /**
> >              * Construct.
> >              *
> >              * @param name
> >              * Component name
> >              */
> >             public FileUploadForm(String name)
> >             {
> >                 super(name);
> >
> >                 // set this form to multipart mode (always needed for
> > uploads!)
> >                 setMultiPart(true);
> >
> >                 // Add one file input field
> >                 add(fileUploadField = new FileUploadField("fileInput"));
> >                 add(styleNameTFld=new TextField("styleNameTFld"));
> >
> >                 // Set maximum size to 100K for demo purposes
> >                 setMaxSize(Bytes.kilobytes(500));
> >             }
> >
> >             /**
> >              * @see wicket.markup.html.form.Form#onSubmit()
> >              */
> >             protected void onSubmit()
> >             {
> >                 final wicket.markup.html.form.upload.FileUpload upload =
> > fileUploadField.getFileUpload();
> >
> >                 String imgPath = upload.getClientFileName();
> >
> >                 if (upload != null)
> >                 {
> >
> >                 System.out.println("inside onSubmit "+ imgPath);
> >                   // here i am getting the path but how do i get the
> value
> > in the text field??????????????????????????
> >                 }
> >
> >             }
> >         }
> >
>

Reply via email to