Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Nov 23, 2010

This application is out of date, please click the refresh button on your browser. ( Expecting version 5 from client, got 6. )

Common issue after upgrading to GWT 2.1 from previous versions.
If you got this exception, probably you application has gwt-servlet.jar which belongs to the previous version.
Replace it or remove and let you environment to create it instead of the old one.
Worked for me.
Hoping it helps,
Dor

gwt datetimeformat

DateBox startDate = new DateBox();
DefaultFormat dateFormat = new DefaultFormat(){
DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat("MM/dd/yyyy");
@Override
public String format(DateBox box, Date date){
           if (date == null) {
               return "";
            } else {
                return dateTimeFormat.format(date);
            }
  }
};
// attaching formatter
startDate.setFormat(dateFormat);
That's all. Your date would be formatted as MM/dd/yyyy
You can find some more formatters at Google gwt site.
Or GWT in Practice
bye,
Dor

gin.jar

Hi,
Currently there is no jar to download and you must do the job by your self.
To compile gin with ant, svn checkout the latest version from google trunk.
You need to set up a user / system environment variable, restart your IDE and then use ant on build.xml
The new "gin.jar" file will be created in the out\dist directory.
That suite for me. You can also click here for more help.
Dor

gwt compile speed

Hi,
Wondered if there is a solution for gwt permutation compile time, some way to speed it up, because 12 permutation compilation takes time, So there is one,
by adding the following option inside the compiler arguments:
"-localWorkers 2"
The "2" is the number of cores you got on the compiling computer and can be changed.
Hoped i helped,
Dor

IsSerializable

Hi,
Once i was asked by one of our developers, why can't i use the regular Serialzable marker instead of using
IsSerializable.
Simple answer is: You can but, there are several manners that should be take in considerations when doing that.
Better, read Google reference.
Regards,
Dor