【发布时间】:2011-06-28 16:44:00
【问题描述】:
在我的 GWT 项目中,我的服务返回我定义的 Shield 类型的对象。由于 Shield 类型同时被客户端和服务器使用,我将类定义放在共享包中。
Shield 类使用 com.google.gwt.i18n.client.NumberFormat 类(替代java.text.DecimalFormat 等) )。
问题是 NumberFormat 无法放入共享包中,因为它使用 GWT.create() 创建了 LocaleInfo 的实例。
有什么方法可以在共享包中使用 com.google.gwt.i18n.client.NumberFormat?
【问题讨论】: