I am trying to use FormPanel. oN FormPanel
formPanel.setWidget(flexTable);
A check box , a listBox and FileUpload is added
flexTable.setWidget(4, 1,listBox);
flexTable.setWidget(5, 1, fileUpload);
flexTable.setWidget(6, 1, checkBox);
// More Code
A Servlet code is written to get the all the values which running fine only for fileUpload. How to get the value of checkBox an ListBox.
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
byte[] buffer = new byte[1310720];// 10 MB
try {
ServletFileUpload upload = new ServletFileUpload();
FileItemIterator iterator = upload.getItemIterator(request);
while (iterator.hasNext()) {
FileItemStream item = iterator.next();
InputStream stream = item.openStream();
if (item.isFormField()) {
// WHAT TO DO??
} else {
int len;
while ((len = stream.read(buffer, 0, buffer.length)) != -1) {
response.getOutputStream().write(buffer, 0, len);
}
}
}
} catch (FileUploadException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Plz help to get the value of checkBox and List Box.