Tuesday, May 20, 2014

GWT Jquery integration

It is very easy to have GWT Jquery integration using gwtquery. Follow below steps

Add maven dependency for gwtquery, at the time of writing this article it was 1.4.2 and tested it with GWT 2.5.0 version. 
        <dependency>
            <groupId>com.googlecode.gwtquery</groupId>
            <artifactId>gwtquery</artifactId>
            <version>1.4.2</version>
            <scope>provided</scope>
        </dependency>

Then inherit your module from required gwtquery module.
<inherits name='com.google.gwt.query.Query'/>

User jquery api wrappers as follows.
import static com.google.gwt.query.client.GQuery.$;
..
...
public class GwtJquery implements EntryPoint {

	@Override
	public void onModuleLoad() {
		$("#startup").fadeIn(1000);
		$("#product").delay(2000).fadeIn(1000);
	}
...
...
}

For More details refer getting started







2 comments:

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

    Java Online Training Java Online Training Core Java 8 Training in Chennai java 8 online training JavaEE Training in Chennai Java EE Training in Chennai

    ReplyDelete
  2. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

    Java Training in Chennai

    Java Training in Bangalore

    ReplyDelete