Developing 2.0 like forms using GWT

13 views
Skip to first unread message

Vik

unread,
Mar 28, 2010, 1:50:11 AM3/28/10
to google-we...@googlegroups.com
Hie

I have a big form and right now validations are written on submit button which very 1.0 -ish 

Do we have a ready to use form component in GWT which gives cool features like as soon as you tab out field is marked red for the required validation.

Please suggest.

 
Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com

kozura

unread,
Mar 28, 2010, 1:28:00 PM3/28/10
to Google Web Toolkit
Vik, my answer to this and your other question is, you may not want to
be using forms, which are more pre-AJAX ways of getting info from the
user, and are included in GWT mostly for compatibility with existing
form-based services. If you want a truly dynamic application with
validations and the like, build it using the various GUI components
like TextBox, and use RPC calls to communicate with the server.

Vik

unread,
Mar 29, 2010, 12:02:57 AM3/29/10
to google-we...@googlegroups.com
Hie

yeah i m using formPanel just to  wrap my gwt ui components. So, even after using gwt components like textbox etc I am not sure
how to build a ajax type validation form.

Please advise

Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


kozura

unread,
Mar 29, 2010, 12:31:38 AM3/29/10
to Google Web Toolkit
So don't use the FormPanel/Submit mechanism. Instead add handlers to
the widgets for what you are trying to do, ala
http://code.google.com/webtoolkit/doc/latest/DevGuideUiHandlers.html.
For example you can add an "Ok" button with a ClickHandler that
gathers all the values from the GWT widgets that the user entered,
does error checks, and sends it to your server via RPC (see
http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html).
Or you can add an OnBlurHandler or similar to a textArea that does
validation, turns it red as needed, whatever.

Vik

unread,
Mar 29, 2010, 1:18:07 AM3/29/10
to google-we...@googlegroups.com
hie 

Great thanks.. along with this do you have any code example as well to do a quick start?

Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com


Reply all
Reply to author
Forward
0 new messages