It looks like component Form doesn’t work as the same way as HTML form on the client side, so I couldn’t find a way to post a form to another server (not my vaadin application works) to let user get some feedback.
Does anyone know how to post a form to another server? or it should exchange data at server level?
Yeah, Vaadin Forms have really nothing to do with HTML forms, which are used in traditional web applications. The processing model in Ajax apps is different; forms are not submitted as regular HTTP requests that load a new page.
I’m not sure what your case is, but if you have a (legacy) web application that’s based on conventional HTML form submission, and you’re building a new UI on top if it with Vaadin, you could communicate with it on the server-side, using it as a background web service.
I suppose that if you just want to use Vaadin for some user interaction in a form, it might be possible to wrap the form in a CustomLayout that contains a HTML form, inside which the Vaadin form is. Submitting the HTML form would send the contents of the Vaadin components as well. At least for TextFields and such, not for all components, as they are not all based on HTML form elements. You could face many difficulties with this though.
The easiest way is for you to take data from the Vaadin UI and send it yourself to the server. You can do this in standard Java using URLConnection, but Apache has a nice library. See
Http Post Example.