Here is the code snippet anyway:
private FlexTable flexTable = new FlexTable();
private final Label uploadLabel = new Label("Upload Document:");
private final Label errorLabel = new Label();
private final FileUpload fileUpload = new FileUpload();
private final Button uploadButton = new Button();
private final FormPanel formPanel = new FormPanel();
private final TextBox docType = new TextBox();
...and the code that sets this up:
docType.setVisible(false);
formPanel.setEncoding(FormPanel.ENCODING_MULTIPART);
formPanel.setMethod(FormPanel.METHOD_POST);
formPanel.setWidget(flexTable);
// set the names of the widgets so they can be fetched on the server
side on form post
docType.setName(DocumentType.FAQ.name());
fileUpload.setName("document");
flexTable.setWidget(0, 0, uploadLabel);
flexTable.setWidget(0, 1, fileUpload);
flexTable.setWidget(1, 1, uploadButton);
flexTable.setWidget(2, 0, docType);
uploadButton.setStyleName("upload");
// vPanel is from superclass which extends Composite
vPanel.add(flexTable);
vPanel.add(errorLabel);
vPanel.add(formPanel);
Like I said, the form calls the remote servlet (NOT a GWT-RPC servlet)
-- this is a standard servlet. I breakpoint in the servlet method,
and request.getParameters( ) is always null.
The form posts no content. Any ideas why?
On Thu, Sep 24, 2009 at 3:03 PM, Davis Ford
<[email protected]> wrote:
> We have looked over the code again and again that submits the form
> info, and don't see any issue with it. We get a POST to the servlet
> we created to receive the multipart form params, but the parameters
> are always null.
>
> We have set the name of the widgets we want posted (i.e.
> textBox.setName("some-name");)
>
> We have added these widgets to a standard FlexPanel, and set this
> widget on the FormPanel (i.e. formPanel.setWidget(flexPanel));
>
> We call formPanel.submit( ) on user click...a POST shows up on the
> server, but there is no content.
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---