Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT 2.1 Editors framework

I'm looking for some documentation or examples on how to use the GWT 2.1 Editor framework. Google's documentation is uh, somewhat lacking.

From the limited documentation available, I've been able to glean that editors will (in theory) allow you to more easily bind GUI elements to data models. This will alleviate the very common task of copying data into a TextArea/ListBox/CheckBox, and then replicating the user's changes back to the underlying model (and ultimately the DB).

If it does indeed deliver on this, it will be very welcome. For now, I'm left scratching my head as to how to implement any of it. Any pointers to documentation or examples would be highly appreciated.

like image 727
George Armhold Avatar asked Feb 12 '11 16:02

George Armhold


2 Answers

A little while ago, when I was in the same situation (not only did the snippets from the Google documentation not work, but they also left out the most basic glue code to make them work), I attempted to write the most basic Editors example project for myself. I learned the editor basics from the DynaTableRf example (which is way too complex to get started with Editors IMO), and put something together.

Let me warn you: It's simple, but it's raw and unpolished, it's just a proof of concept. It's just a zip of my Eclipse project: http://www.mediafire.com/file/nwsohz7ov3cx173/playGwtEditors-02.zip (note: This is the old version for GWT 2.1)

Update

I just updated the project to use GWT 2.3. The old GWT 2.1 bug which I had mentioned in my project is gone now. Here's the new version: http://www.mediafire.com/file/u1yffwuxi441dip/playGwtEditors-03.zip

like image 76
Chris Lercher Avatar answered Oct 04 '22 22:10

Chris Lercher


I've been in the same place for a while, trying to figure out how Editors hook up with the RequestFactory stuff. The DynaTableRF sample in the GWT 2.1.1 release is what finally started making things come together - it's complex, but I think you need a complex app to start seeing the benefits. The code in each step is wonderfully simple - but there are a lot of steps!

like image 43
Riley Lark Avatar answered Oct 04 '22 20:10

Riley Lark