• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GWT Form data binding

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
I'm starting with GWT app and was wondering how we would go about binding form fields to form just like struts . Say i have a Person object which has name age sex Adress ( which itself has addline1,line2 city and country). Say i were to use this for my page and the generic person details like name age etc displayed as a tree node and the adress details displayed on another node. I need to save/ display these. I know how to do this in struts spring etc but not sure about GWT. I do not want to bind each field like a normal servlet/jsp app by getting it using request params. Also, another issue i foresee is that, say a user enters only name and goes to the address node to fill address, once he come back to the first node, the name he entered should be present.

I need a starting point from which i can take off on my own. Starting to look at editors.
Any help on this would be appreciated.

Warm Regards
Jhakda
 
Jhakda Velu
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
I got the form submit part working. From my form panel, which i named formPanel, all i need to do is to call the submit method.

All widgets whose name is set using the widget.setName("shouldMatchAttributeNameOfDTO") matches that of the DTO will get set in the respective attributes. As we used Spring, all i had to do in my controller is to write a method


where Person is the data transfer object.

However, i where i am still stuck is holding the data in my 2 panels. My First panel has generic info about a person like name age etc and the second panel has address details. I am able to save both panels individually, but if i enter data in my first panel and traverse to the address panel, only the address portion gets saved. I also loose the data which i enter in the panel once i navigate to the other panel.

If someone has thoughts on how to do this, i would be most eager to know.

Thanks in advance\
Jhakda
reply
    Bookmark Topic Watch Topic
  • New Topic