views:

153

answers:

0

I'd like to learn how to use Spring Forms and GWT. Basically my forms just ask for a bunch of links and you can submit them. The twist is that when I add a link I want it to be previewed (e.g print the title of the page, some description etc) via an RPC call.

The solution I can think of is to use GWT's form panel and bind the inputs to the Spring command class. For example if I usually did this in the jsp:

<form:input path="link1"/>

which is equivalent to this in raw HTML:

<input id="link1" name="link1" type="text" value=""/>

I'd do this in GWT:

    inputTextBox = new TextBox();
inputTextBox.setName("link1");
inputTextBox.setValue("");

and then I'd add a button next to the text box "add" which has a click handler that'll make an RPC call that returns a the preview of the link.

Haven't tried this though and I'd really like to know if this is a good solution or if there are better ones out there (kindly provide resources)