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 google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to