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??????????????????????????
}
}
}