views:

22

answers:

1

When I used the GWT Internationlaization with Constants, I got an exception saying that "No Resoure found for Key" .But the Key is already defined both in the interface and properties file. And the file format is utf-8. Can someone point to me that what could be the source of the error.

//Here is my Interface
public MyLabel extends Constants{
@Key("hello")
public String getHello();

}
//Here is the content of my properties file
hello = Hello

//Below is the Usage
MyLabel label=(MyLabel)GWT.create(MyLabel.class);
label.getHello();

//Hope this is the enough info to make a clue.

Thx in advance.

A: 
//Here is my Interface
public MyLabel extends Constants{
@Key("hello")
public String getHello();

}
//Here is the content of my properties file
hello = Hello

//Below is the Usage
MyLabel label=(MyLabel)GWT.create(MyLabel.class);
label.getHello();

Hope this is the enough info to make a clue. Thx so much. Chris.

chris
You'll get a much better response by editing your initial question, rather than adding information as an answer, and also by formatting your code `as code`, which can be done by putting four spaces before each line.
Marc Bollinger