I'm working on a GWT application, and we introduced a Money class that contains a java.util.Currency. The only problem is that GWT doesn't seem to support this class.
I did a google search and found this code in the GWT source code, but I'm not quite sure what the "jat numberformat-r2942" library is, or how to inherit it into my project. Has anybody successfully been able to use this GWT library? If not, what is the best way to deal with currencies in a GWT application?
Should I just capture the currency as a String on the client side, then create a Currency object on the server side? We're trying to use the GWT-dispatch library, so I'd like to use the same bean on the client and server side.
You can use <super-source> to replace all non-translatable classes with your version.
Take a look at http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html, look for "Overriding one package implementation with another".
OTOH, if you only need to transfer this object through GWT-RPC, then use the new RequestFactory that solves this issue altogether - there are no common classes on server and client, proxies are used instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With