Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to set method and action of a Vaadin Form
I have a Form attached to a Window which is attached to an Application which runs on an Embedded.
The Embedded frame is attached to a sub-Window of another Application.
I am using Vaadin Application and Form because
* to exploit validation, aesthetics and other conveniences
* I don't want to escape out of Vaadin environment just to submit a simple html form.
After validation, I wish to submit the form to a non-Vaadin application URL in another server.
But I cannot find a way to set the action URL or the post/get method of the form.
I cannot use GWT FormPanel because it is not a Vaadin Component. Alternatively, is there a way to attach a GWT FormPanel to a Vaadin Window? No, I don't wish go thro the complexity of integrating custom GWT widgets, because I find the procedure described in the book of vaadin of integrating a gwt widget too complex and unnecessary for a simple html form submission.
I just want to submit a Vaadin Form like I could a simple html form. Any suggestions for alternatives, without having me break away from the vaadin Application framework is appreciated.
Need advice. Thanks.
Okay, for one of the roadblocks I am facing on this Form submit issue involves auth.
For openid v2, if you realise, it allows more than 2048 chars and the convenience of post method. Trivially, the openid-consumer server fills up all the openid parameters and presents the form and user simply clicks a [continue] button. With ajax/gwt, submitting that form to openid supplier-server could just be triggered without having the user do anything.
I took two weeks to create a nice looking openid/google-account/oauth login vaadin application and today's finishing touches abruptly had me discover I cannot/do not know how to submit a vaadin form component to the auth server. So, for this openid/auth form, since no aesthetics are necessary or any fields visible, I am just redoing part of my past two weeks' work and transferring all my auth routines to a gwt entry point. Which is a rather unnecessary trouble, if ... only if I knew how to submit-post a vaadin form component.
But for my other visible forms, I really wish someone could quickly tell me how to submit-post a vaadin Form component. Or, alternatively, tell me the laziest way possible to incorporate a gwt vanilla formpanel into a vaadin window.
I'm not sure if I understood correctly, but would it help if you built a gwt widget that you could use to send the form? You could define the parameters and values from the server-side, and just create a form with hidden inputs and submit it.
Risto Yrjänä: I'm not sure if I understood correctly, but would it help if you built a gwt widget that you could use to send the form? You could define the parameters and values from the server-side, and just create a form with hidden inputs and submit it.
Nope, I hope not to have to do that.
For an openid login form, since the form is invisible, I can do that.
But it is not ideal for visible forms. I want to stick to the vaadin framework, look and feel as much as possible. My style of programming is to use as much as possible a single framework per project. So if the situation makes it impossible to use vaadin, then I will abandon vaadin altogether and use plain gwt so that only need to focus at one single framework per project.
Were you able find a solution to your problem in Vaadin?. I'm also in a similar situation and need help.
The scenario is, I need a FORM with following fields,
- File (The File select field)
- Some hidden fields
A user can select the file and add some comments about the file. I need to POST the file contents to Amazon S3 POST URL(eg. http://<<YOUR BUCKET>>.amazonaws.com/) and send the file name and the comments to my web application.
Is there any way to achieve this without writing custom components. Even if we have to write one, welcome any suggestions, since I'm new to both Vaadin and GWT.