Thanks Lorenzo. The link was very useful. Actually the issue was resolved when I placed the properties file in the same package where my interface was placed.
Regards Vibhuti On Mon, Oct 11, 2010 at 7:28 PM, l.denardo <[email protected]>wrote: > A link to documentation on the matter: > > > http://code.google.com/webtoolkit/doc/latest/tutorial/i18n.html#international > > Regards > Lorenzo > > On Oct 11, 10:22 am, Vibhuti Gupta <[email protected]> wrote: > > Hello > > > > I am facing problem reading property file in GWT. I created an interface > > which extends the Constants interface and defined methods corresponding > to > > the properties in properties file. > > When I run my application I get the following errors: > > > > com.google.gwt.i18n.rebind.AbstractResource$MissingResourceException: No > > resource found for key 'display.alert' > > at > > > com.google.gwt.i18n.rebind.AbstractResource$ResourceList.getRequiredStringExt(AbstractResource.java:246) > > at > > > com.google.gwt.i18n.rebind.SimpleValueMethodCreator.createMethodFor(SimpleValueMethodCreator.java:95) > > at > > > com.google.gwt.i18n.rebind.AbstractLocalizableImplCreator.delegateToCreator(AbstractLocalizableImplCreator.java:313) > > at > > > com.google.gwt.i18n.rebind.ConstantsImplCreator.emitMethodBody(ConstantsImplCreator.java:163) > > at > > > com.google.gwt.user.rebind.AbstractGeneratorClassCreator.genMethod(AbstractGeneratorClassCreator.java:265) > > at > > > com.google.gwt.user.rebind.AbstractGeneratorClassCreator.emitMethods(AbstractGeneratorClassCreator.java:233) > > at > > > com.google.gwt.user.rebind.AbstractGeneratorClassCreator.emitClass(AbstractGeneratorClassCreator.java:116) > > at > > > com.google.gwt.i18n.rebind.AbstractLocalizableImplCreator.generateConstantOrMessageClass(AbstractLocalizableImplCreator.java:133) > > > > As per the java docs, I have created the properties file in the same name > as > > the interface i.e. Test.java(I) and Test.properties. > > I am accessing the constants the following way: > > > > public interface Test extends com.google.gwt.i18n.client.Constants{ > > @Key("display.alert") > > String displayAlert(); > > > > } > > > > public static Test constants = (Test) GWT.create(Test.class); > > > > constants.displayAlert(); > > > > Any ideas on what am I missing here. > > > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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-appengine?hl=en.
