aspose file tools*
The moose likes GWT and the fly likes SmartGWT call-back BUG Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "SmartGWT call-back BUG" Watch "SmartGWT call-back BUG" New topic
Author

SmartGWT call-back BUG

Uditha Perera
Greenhorn

Joined: Jun 06, 2011
Posts: 8

Hi All,

One of the GWT Bug(Sorry, as I think It's a Bud) ate my valuable development time recently.
I was saving my 4 DynamicForm's data by using
addData(Record record, DSCallback callback) method of a DataSource.
Saving back-end method had a business validation which return RunTimeException with validation error message.
If due to validation, saving get interrupted, i didn't want to run code inside execute(DSResponse response, Object rawData, DSRequest request)

But the issue was, neglecting there's a RunTime validation exception or not, lines inside "execute" got called which was not supposed to call when RunTime validation exception thrown.

After so many testing, wasting time, I found that the solution as using a DynamicForm object to save data with call-back would work.
That's calling
saveData(DSCallback callback) with execute(DSResponse response, Object rawData, DSRequest request) of DynamicForm.
If I use this way, when RunTime validation exception thrown when save data, lines inside "execute()" not get called.

So the lesson is,
DataSource.addData method with call-back will execute lines inside "execute()" method when RunTimeException is returned or not. (In Both time)
DynamicForm.saveData method will call-back will not execute lines inside "execute()" when RunTimeException is returned. call otherwise.

Can you experts elaborate on this. Is this a really GWT issue or is that something GWT developer purposely done.

Thanks in advance,
Uditha
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: SmartGWT call-back BUG
 
Similar Threads
Need confirmation from experts.
sping+hibernate got NullException
Issue compiling a GWT FeedReader Application
Spring 2.5 - Rolling back first method, when the second method throws Runtime ex
Should Bean developer throw RemoteException & related stuff