What is the correct way to do a RequestBuilder
in GWT to be able to do exactly what this does for plain HTML:
<form action="javascript:;" method="post" data-field="form">
<input class="rounded" name="username" size="20" type="text" data-field="username">
<input class="rounded" name="password" size="20" type="password" data-field="password">
<button class="submit" type="submit" value="Login" data-field="button"><br>
</form>
Best Answer
Although you can wrap each input with gwt widgets, in the case of large forms it is better to iterate over all form elements, read their names and values, and produce a query-string to send as data with your requestBuilder, this code should work:
But, I prefer to make use of the gwtquery slogan: (
do more, write less
):