How to add jquery in GWT page - gwt

I have a GWT Application , I need to add Jquery in my GWT
as i wish to have HighCharts in GWT and for that i have to have Jquery coz HighCharts need them for that purpose I need to have Jquery in my Page
How to add Jquery in my GWT Page ?
Thanks

You should probably use gwtQuery instead. It's a port of jQuery written for GWT.
If you really think you need to use jQuery, download the js from their site, add it to your war directory, and reference it in your entry point's HTML file.

you can use jquery in gwt application easily using native method.
you have to add js files in html page and than create class that contain only JSNI methods and jsobject and you can easily use jquery in your gwt application
you can easily learn from http://code.google.com/p/gwtquery-ui/

Related

How to use History.js with GWT?

I want to use History.js from Google Web Toolkit.
I know GWT has History functionality of it's own, but I don't like it because it uses the hashes in the URI, I want to use the new HTML5 History API as much as possible.
The only current way that I can think of to run History.js and GWT together is to write the History.js part in plain Javascript (or jQuery) and then manually call a GWT method.
It would be nice if it was possible to use the whole History.js functionality from within GWT's Java files.
No pain at all with that .
You just simple add your History js file on your document and you can use it .
Here i answered how you can use an external js in GWT .
Using externel js in GWT
After you call the native method you can continue with gwt method

GWT and web template with javascript

I have GWT Web application and web template that consists of html+css+javascript files.
UiBinder holds html template in HTMLPanel. Problem is that this template is based on many javascript files and I know that GWT have problems with that. So my page is rendered without some javascript features.
What can I do with this? What is correct solution for GWT and external web templates?
The issue is not GWT-specific: you cannot inject <script>s using innerHTML (which HTMLPanel ultimately uses).
If you need to dynamically inject scripts in your app, then use ScriptInjector.

Adding gwt Tag inside GSP Page

Is it possible to include gwt tags into gsp page. I've installed gwt grails plugin but I haven't been able to achieve this yet.
Its possible to include dojo tags into gsp page after u install the dojo grails plugin
I think you're mixing up the context where these tags are supposed to be used.
GSP tags are for creating a server-side template that will be rendered and sent to the browser as completed HTML. GWT's ui:binder tags are for creating a template that's compiled by GWT and used to generate a page on the client-side within the browser. They operate in two different realms.

HTML5 website widgets on GWT?

Can i develop widgets on gwt for html5 web site? And if yes, what do you think about such compilation of technologies?
Since GWT still compiles down to Javascript you can make HTML5 widgets by either using JSNI or DOM Manipulation setting Attributes for HTML5 Properties.
If you wanted to do vector drawing (canvas) you can use: http://code.google.com/p/google-web-toolkit-incubator/wiki/GWTCanvas
GWT 2.2 adds support for canvas.
Release Notes
Demo
Source

GWT/java and javascript

can i design my web pages in html and css instead of java methods and use gwt only in parts of page that i need ajax? and which one is better gwt, extgwt, vaadin(it run apps in server-side.can i also use it in client-side?), etc...? do i also need to know javascript for using gwt?
thanks
can i design my web pages in html and
css instead of java methods and use
gwt only in parts of page that i need
ajax?
Yes, you can. You can create a div on your HTML page and insert your GWT widget there.
which one is better gwt, extgwt,
vaadin(it run apps in server-side.can
i also use it in client-side?)
I don't know about vaadin but Ext-GWT is a set of ready made components to use with GWT which make your life easier especially if you want to build an web app that looks and feels like a desktop application.
do i also need to know javascript for
using gwt?
No, it can be useful sometimes but is not necessary.