Messages & Constants (com.google.gwt.i18n.client.Constants & com.google.gwt.i18n.client.Messages) in GWT allow us to put all Messages & Constants into properties
files so that we can change these messages & constants at any time
we want without the need to recompile the whole webapp when we need to
change them.
Ex: you have a message call "User451 pls views order" in myMessages.properties
userViewOrder=User''{0}'' pls views order
& in the MyMessages.java
public interface MyMessages extends Messages{
String userViewOrder(String userID);
}
At a later time, the bos wants to change the message to "Customer451 pls views order" then we don't need to recompile the whole project but just need to modify the myMessages.properties file
userViewOrder=Customer''{0}'' pls views order
So my question is, can we achieve the similar thing at the server level?
For example, in server, after inserting order data successfully into DB we need to send a private message to the customer immediately right at the server. Ex:
public boolean isertOrder(String data, String userID){
String sql="insert query here";
..... more code ....
int resultCode=prepareStmt.executeUpdate();
if (resultCode==1){
//insert a notification into Message table
String msg="Congratulation user "+userID+", You ordered successfully!";
// how to manage this message without needing to recompiling the whole project
String sql="insert into Message values (.....)"
///do the inserting here
}
}
can we manage Messages & Constants (i18n) at Server as we manage at Client?
Can we be able to do that?
& more importantly, Can we do it safely?
Messages & Constants (
com.google.gwt.i18n.client.Constants&com.google.gwt.i18n.client.Messages) in GWT allow us to put all Messages & Constants intopropertiesfiles so that we can change these messages & constants at any time we want without the need to recompile the whole webapp when we need to change them.
Ex: you have a message call "
User451 pls views order" inmyMessages.propertiesuserViewOrder=User''{0}'' pls views order& in the
MyMessages.javapublic interface MyMessages extends Messages{ String userViewOrder(String userID); }At a later time, the bos wants to change the message to "
Customer451 pls views order" then we don't need to recompile the whole project but just need to modify themyMessages.propertiesfileuserViewOrder=Customer''{0}'' pls views orderSo my question is, can we achieve the similar thing at the server level?
For example, in server, after inserting order data successfully into DB we need to send a private message to the customer immediately right at the server. Ex:
public boolean isertOrder(String data, String userID){ String sql="insert query here"; ..... more code .... int resultCode=prepareStmt.executeUpdate(); if (resultCode==1){ //insert a notification into Message table String msg="Congratulation user "+userID+", You ordered successfully!"; // how to manage this message without needing to recompiling the whole project String sql="insert into Message values (.....)" ///do the inserting here } }can we manage Messages & Constants (i18n) at Server as we manage at Client?
userViewOrder=User''{0}'' pls views orderuserViewOrder=Customer''{0}'' pls views order
So in this case, do i need to recompile the while project?--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Hi Thomas, I am confused,
why we need to recompile the whole project when we just change a simple text in properties file?
There are also a few projects that directly try to use your GWT interfaces on server-side; and it's also a planned feature of GWT proper (no ETA yet).