I'm using Messages on the client like this:
public interface MyMsg extends Messages{
String greeting(String name);
}
public class App implements EntryPoint{
public void onModuleLoad(){
MyMsg myMsg = GWT.create(MyMsg.class);
String greeting = myMsg.greeting("Smith");
...
}
}
I want to be able to use this on the server as well.
I know I can implement it like this:
public class MyMsgImpl implements MyMsg{
ResourceBundle b = ResourceBundle.getBundle("MyMsg");
public String greeting(String name) {
return new MessageFormat(b.getString("greeting")).format(new Object[]
{ name });
}
}
But this is code that should be generated. Do you know of any
generators that can do this? or is there a better way to use Messages
on the server?
--
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.