java.util.ResourceBundle is not available to client side GWT code.

I would advise sticking to the Constants interface, since it has the advantage 
that the bundle data 
will be inlined into your JavaScript. There will be no properties files loaded 
at runtime, and no 
Hashtable like lookup when a String is needed.

Constants have the added advantage of being able to return various data-types, 
which are all checked 
for validity at compile time.

Even if ResourceBundle was available to GWT, it would be a waste of space and 
reduce the performance 
of your application.

That said, you can make use of ConstantsWithLookup which is a combination 
between Constants and 
ResourceBundle.

Hope that helps.
//J

Suresh wrote:
> Hi,
> 
> I'm trying to develop a module with GWT and integrate it with
> exisiting project in JS. My Page contains lot of list boxes for which
> i have to load the values from properties file. If i use
> "com.google.gwt.i18n.client.Constants" i have to write lot of getter
> methods for each values with interface. Instead of this i'm planning
> to use ResourceBundle but if i use Resourcebundle i'm gettign the
> following error during compilation "No source code is available for
> type java.util.ResourceBundle;". What needs to be done to resolve this
> error?
> 
> Regards,
> Suresh
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to