The Google Web Toolkit (GWT) JavaScript Native Interface (JSNI)

AMInternet and Web Development

Dec 3, 2011 (5 years and 8 months ago)

798 views

© 2010 Marty Hall
The Goo
g
le Web Toolkit
(
GWT
)
:
g ( )
JavaScript Native Interface
(
JSNI
)
(
GWT 2.0
V
ersion
)
Originals of Slides and Source Code for Examples:
htt
p
://courses.coreservlets.com/Course-Materials/
g
wt.html
(
)
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.
p
g
© 2010 Marty Hall
For live Ajax & GWT training, see training
t htt//l t/
courses

a
t htt
p:
//
courses.coreserv
l
e
t
s.com
/
.
Taught by the author of Core Servlets and JSP,
More
Servlets and JSP
and this tutorial Available at
More
Servlets and JSP
,
and this tutorial
.
Available at
public venues, or customized versions can be held
on-site at your
organization.
C d l d d t ht b M t H ll
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.

C
ourses
d
eve
l
ope
d
an
d

t
aug
ht

b
y
M
ar
t
y
H
a
ll
– Java 6, servlets/JSP (intermediate and advanced), Struts, JSF 1.x, JSF 2.0, Ajax, GWT 2.0 (with GXT), custom mix of topics
– Ajax courses can concentrate on 1 library (jQuery, Prototype/Scriptaculous, Ext-JS, Dojo, Google Closure) or survey several
• Courses developed and taught by coreservlets.com experts (edited by Marty)
– Spring, Hibernate/JPA, EJB3, Web Services, Ruby/Rails
Contact hall@coreservlets.com for details
Topics in This Section
• Calling JavaScript from Java
f h d
– Format o
f
met
h
o
d
s
– The $wnd and $doc variables

Argument types
Argument

types
– Example: using Scriptaculous effects
• JavaScript Overlay types
– Example: JsCircle class
• JsArray
Example:
JsArray
<
JsCircle
>

Example:

JsArray
<
JsCircle
>
• Calling Java from JavaScript
– Format of method t
yp
es
yp
– Designating overloaded methods
– Argument types
5
© 2010 Marty Hall
Overview
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.
Idea
• Write Java methods that call JavaScript
Enclose Ja aScript code in comments

Enclose

Ja
v
aScript

code

in

comments
• Use $wnd variable to access window object
• Use $doc variable to access document object

Pass primitives strings and arrays only
Pass

primitives
,
strings
,
and

arrays

only
• Overlay types
– You can wrap JSON objects in Java classes
J S i t
d ll J

J
ava
S
cr
i
p
t
co
d
e can ca
ll

J
ava
– Use JNI-like format to refer to methods and fields
• Notes
– JSNI can be used only for pure client-side code
• Method bodies ignored when used in server-side classes

JSNI should be used s
p
arin
g
l
y
p g y
• Most normal JavaScript functionality available in GWT
• Mostly used to wrap external JavaScript libraries or to process
non-RPC return values (e.g., JSON from regular HTTP request)
7
© 2010 Marty Hall
Calling JavaScript from
Calling

JavaScript

from

Java
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.
Basic Syntax
• Declare method native

Can be private or public static or instance

Can

be

private

or

public
,
static

or

instance
• Use special comments for method body
– Start method with /*-{

End method with }
-
*
/;
End

method

with

}
-
/;
• private native void foo(...) /*-{ JavaScript-Code }-*/;
• Argument and return types

Strin
g,
numeric
p
rimitive
,
boolean
g,p,
• Treated normally as argument or return type
– Array
• Argument: only used to be passed back to Java

Return:only if array came fromJava code

Return:

only

if

array

came

from

Java

code
– Object
• Argument: special syntax for accessing (see later slide)
• Return: only if Object came from Java code
J S i tObj t

J
ava
S
cr
i
p
tObj
ec
t
• Argument: only if JavaScriptObject came from JavaScript code
• Return: can only be used to pass to another JSNI method
9
Basic Syntax
Can be public, private, protected, default.
Can be static or instance methods.
Return type can be void String or primitive Array Object JavaScriptObject with limits
Can be static or instance methods.
Must be declared native
Return type can be void
,
String
,
or primitive
.
Array
,
Object
,
JavaScriptObject with limits
.
Arguments can be same options (except void).
Methods must start with /*-{
private native void alert1(String message) /*-{
$wnd.alert(message);
}-*/;
Methods must end with }-*/;
Normal Java compiler will see
private native void blah(...) /* comment */ ;
Normal JavaScript code here.
Use $wnd to access window object.
Use $doc to access document object.
Note that this is a simplified e ample Yo do
10
Note that this is a simplified e
x
ample
.
Yo
u
do
not need
JSNI to do an alert box. Just call
Window.alert in Java. Most standard
JavaScript can be done directly in GWT
without using JSNI.
Example Overview
• Goal
– Monitor a textfield value and echo result into div
– If value is “text1” call window.alert

Points

Points
– Basic JSNI syntax
– Usin
g
the $wn
d
variable
g
• Assumed project setup already done
– Clicked “g” to create new Web Application Project
D l d fil d ib d i l i

D
e
l
ete
d
extraneous
fil
es as
d
escr
ib
e
d

i
n
l
ast sect
i
on
– In auto-generated HTML file, removed everything except
scri
p
t ta
g
and re
p
laced with custom HTML
p g p
– I n a u t o - g e n e r a t e d J a v a c l a s s, r e m o v e d e v e r y t h i n g e x c e p t
class definition and signature of onModuleLoad
11
Basic Syntax: Auto-Generated
HTML File
HTML

File

<head><title>JSNI</title>
<head><title>JSNI</title>
<link rel="stylesheet"
href="./css/styles.css"
type
="
text/
css
"
/>
Prototype and Script.aculo.us will be used in later
examples. JSNI is mainly used to wrap external
JavaScript libraries or to process non-RPC server
return values. GWT already provides access to
most JavaScri
p
t functionalit
y
, so JSNI is rarel
y

type text/
css
/>
<script src="./scripts/prototype.js"
type="text/javascript"></script>
<scri
p
t
p y y
n e e d e d f o r c o r e J a v a S c r i p t c a p a b i l i t i e s.
p
src="./scripts/scriptaculous/scriptaculous.js?load=effects"
type="text/javascript"></script>
<scri
p
t src="./scri
p
ts/circles.
j
s"
p p j
type="text/javascript"></script>
<script type="text/javascript" language="javascript"
src="gwtjsni/gwtjsni.nocache.js"></script>
</head>

12
Created automatically by GWT
and left unchanged. Except for
this line, all of HTML file edited
by hand.
Basic Syntax: Auto-Generated
HTML File (Continued)
HTML

File

(Continued)
…<fieldset>
<legend>Invoking Script aculo us Effects</legend>
<legend>Invoking

Script
.
aculo
.
us

Effects</legend>
<h3>Enter "test1", "test2", or "test3".</h3>
<table border="1">
<
tr
><
th
>Input</
th
>
<
tr
><
th
>Input</
th
>
<th>Result</th></tr>
<tr><td id="textfieldID"></td>
<td id="resultID"><
/
td><
/
tr
>
The ids match arguments to
//
</table><br/>
</fieldset>
<
p
/
>
The ids match arguments to
RootPanel.get in Java code.
p
<legend>Using JavaScript Overlay Types</legend>
<br/>
<span id="circle-button-1"></span>&nbsp;&nbsp;
<span id="circle-button-2"></span>
<br/><br/>
</fieldset>…
13
Basic Syntax: Auto-Generated
Java Class
Java

Class
public class GwtJsni implements EntryPoint {
private
TextBox
textfield;
private

TextBox
textfield;
private HTML resultArea;
public void
onModuleLoad
() {
public

void

onModuleLoad
()

{
textfield = new TextBox();
textfield.addKeyUpHandler(new TextfieldHandler());
ltA
HTML("<
i
>R lt ill h </
i
>")
resu
ltA
rea = new
HTML("<
i
>R
esu
lt
w
ill
go
h
ere
</
i
>")
;
RootPanel.get("textfieldID").add(textfield);
RootPanel.get("resultID").add(resultArea);

}
14
Basic Syntax: Auto-Generated
Java Class (Continued)
Java

Class

(Continued)
private class TextfieldHandler implements KeyUpHandler {
public void
onKeyUp
(
KeyUpEvent
event) {
public

void

onKeyUp
(
KeyUpEvent
event)

{
String text = textfield.getText();
resultArea.setHTML(text);
if(text.equalsIgnoreCase("test1")) {
alert1(text);
} else if(text.equalsIgnoreCase("test2")) {
highlight1("resultID");
} else if(
text equalsIgnoreCase
(
"
test3
"
)) {
}

else

if(
text
.
equalsIgnoreCase
( test3 ))

{
highlight2("resultID", text);
}
}
}
private native void alert1(String message) /*-{
$
d l t
( )
$
w
n
d
.a
l
er
t
(
message
)
;
}-*/;
15
Testing in Development Mode
– R-click project name and Run As Web Application
O li k j t i E li P R b tt t
t

O
r, c
li
c
k
pro
j
ec
t
name
i
n
E
c
li
pse.
P
ress
R
un
b
u
tt
on a
t

t
op
– Copy/paste URL into browser that has GWT plugin
16
Testing in Production Mode
– R-click project, Google GWT Compile
O li k j t d th d t lb t t

O
r c
li
c
k
pro
j
ec
t
an
d

th
en press re
d

t
oo
lb
ox a
t

t
op
– Then, change URL by erasing ?gwt.codesvr=…
17
Testing in Deployed Mode
• Copied workspace/GwtJsni/war folder
– Renamed to GwtJsni to keep similar-looking URL
• GwtJsni.html is welcome-file, so filename can be omitted

Deployed to Tomcat on apps coreservlets com

Deployed

to

Tomcat

on

apps
.
coreservlets
.
com
• Could have used any Java-capable server
18
© 2010 Marty Hall
Usin
g
JSNI to Call
g
External JavaScript
Lib i
Lib
rar
i
es
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.
Using External JavaScript
Libraries:Basic Steps
Libraries:

Basic

Steps
• Load the library
– Put <script> tag in head of HTML
p
age
• (Or, put <script> tag in AppName.gwt.xml file)

Define JSNI method

Define

JSNI

method
– As shown previously

Access objects and functions via $
wnd
Access

objects

and

functions

via

$
wnd
– $wnd.someFunction(args)
– new $wnd.SomeObject(args)
– var $wnd.newFunction = function(args) { body }
• Access document via $doc
– $doc.title = "New Title";
20
Example: Using Scriptaculous:
HTML
HTML

<head><title>JSNI</title>
scripts folder installed in “war”
(Same place you put images and css files)
<head><title>JSNI</title>
<link rel="stylesheet"
href="./css/styles.css"
type="text/css"/>
<script src="./scripts/prototype.js"
type="text/javascript"></script>
<script
src=
"
/scripts/
scriptaculous
/
scriptaculous js?load
=effects
"
src=
.
/scripts/
scriptaculous
/
scriptaculous
.
js?load
=effects
type="text/javascript"></script>
<script src="./scripts/circles.js"
type="text/javascript"></script>
<script type="text/javascript" language="javascript"
src="gwtjsni/gwtjsni.nocache.js"></script>
</head>

21
Example: Using Scriptaculous:
Java
Java
private class TextfieldHandler implements KeyUpHandler {
p
ublic void onKe
y
U
p
(
Ke
y
U
p
Event event
)

{
p
y p
(
y p
) {
String text = textfield.getText();
resultArea.setHTML(text);
if(text.equalsIgnoreCase("test1")) {
alert1(text);
alert1(text);
} else if(text.equalsIgnoreCase("test2")) {
highlight1("resultID");
} else if(text.equalsIgnoreCase("test3")) {
highlight2("resultID", text);
}
}
}
}

private native void highlight1(String id) /*-{
new $wnd.Effect.Highlight(id);
$
new
$
w
nd.Effect.Shake(id);
}-*/;
22
Example: Using Scriptaculous:
Results
(Development Mode
)
Results

(Development

Mode
)
23
Wrapping Popular JavaScript
Frameworks
Frameworks
• This was just an example
– There is already a complete JSNI wrapper for
Scriptaculous

Wrappers for JavaScript frameworks

Wrappers

for

JavaScript

frameworks
– Scriptaculous
• http://gwt.components.googlepages.com/
– Ext-JS
• http://www.extjs.com/products/gxt/

(This is actually a native GWT re
-
implementation not a
(This

is

actually

a

native

GWT

re
implementation
,
not

a

JSNI wrapper. Still, it makes EXT available in GWT.)
– Dojo

http://code google com/p/tatami/

http://code
.
google
.
com/p/tatami/
– SmartClient
• http://code.google.com/p/smartgwt/
24
© 2010 Marty Hall
JavaScript Overlay
JavaScript

Overlay

T
yp
es
yp
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.
Big Idea
• Make Java class to wrap a JSON “class”
E d
J S i Obj

E
xten
d

J
ava
S
cr
i
pt
Obj
ect
• All methods must be final
– Use native methods for getters and setters that refer to
JSON properties.
• The “this” variable is automatically defined
– Use re
g
ular methods for derived
p
ro
p
erties
g p p
• E.g., getArea of Circle might be derived from getRadius
– You are permitted to implement interfaces
• N
e
w in
G
WT 2.
0
e G 0
• Get instance
– Must call native method to obtain JSON object
C t ll “ ”

C
anno
t
ca
ll


new

• Use like a normal Java object
26
Overlays Example Code:
Underlying JSON
Underlying

JSON
var circles =
[ {
radius
:1 0 }
[

{

radius
:

1
.
0

}
,
{ radius: 10.0 },
{ radius: 100.0 } ];
27
Overlays Example Code:
Interface
Interface
package coreservlets.client;
public interface Circle {
public double getRadius();
public void
setRadius
(double radius);
public

void

setRadius
(double

radius);
public double getArea();
public String getInfo();
}
}
By having the overlay class (next slide) implement the interface, you make it possible to make methods
that support both overlay classes and either regular classes or collections that contain a mixture of both.
28
Overlays Example Code:
Overlay Class
Overlay

Class

public class JsCircle extends JavaScriptObject
implements Circle {
// Overlay types must have protected, zero-arg constructors
protected Circle() {}
public final native double getRadius() /*-{
return
this radius
;
return

this
.
radius
;

}-*/;
public final native void setRadius(double r) /*-{
this.radius = r;
}-*/;
bli fi l d bl
tA
() {
Real JSON property.
Derived
,
Java-onl
y

p
ro
p
ert
y
.
pu
bli
c
fi
na
l

d
ou
bl
e ge
tA
rea
()

{
return(Math.PI * Math.pow(getRadius(), 2));
}
29
,
y p p y
Overlays Example Code:
Overlay Class (Continued)
Overlay

Class

(Continued)
// GWT 2.0 supports many Java 6 constructs,
//but not
String format
So using explicit
//

but

not

String
.
format
.
So
,
using

explicit
// String concatenation below.
public final String
getInfo
() {
public

final

String

getInfo
()

{
String info =
"Radius=" + getRadius() + ", " +
"
Area
="
+
getArea
();
Area

+

getArea
();
return(info);
}
}
}
30
Overlays Example Code:
Getting Instance of Circle
Getting

Instance

of

Circle
• Java native method (in GwtJsni.java)
– You cannot call “new” on overlay class. You must get
instance from JavaScript
private native Circle getCircle(int i) /*-{
return $wnd.circles[i];
}
*/;
}
-
*/;

JavaScript (shown earlier

in circles js)
getCircle really returns JsCircle, but I declare it to return the interface type
JavaScript

(shown

earlier

in

circles
.
js)
var circles =
[ { radius: 1.0 },
{ radius:10 0 }
{

radius:

10
.
0

}
,
{ radius: 100.0 } ];
31
Overlays Example Code: Button
and Listener (in GwtJsni java)
and

Listener

(in

GwtJsni
.
java)
public void onModuleLoad() {


Button circleButton =
new Button("Show Circle Areas (1)");
circleButton.addClickHandler(new CircleAreaHandler1());
RootPanel.get("circle-button-1").add(circleButton);
}
private
class CircleAreaHandler1 implements
ClickHandler
{
private

class

CircleAreaHandler1

implements

ClickHandler
{
public void onClick(ClickEvent event) {
int numCircles = 3; // Hard-coded length
for(int i=0; i<numCircles; i++) {
Circle circle = getCircle(i);
showCircleAlert(circle);
}
}
}
}
32
Overlays Example Code: Helper
Method
(in GwtJsni java)
Method

(in

GwtJsni
.
java)
private void showCircleAlert(Circle circle) {
String info
="
Original Circle:
"
+
String

info

Original

Circle:

+

circle.getInfo() + "\n";
circle.setRadius(Math.random() * 100);
info += "Modified Circle: " + circle.getInfo();
Window.alert(info);
}
33
Overlays Example: Results
(Development Mode)
(Development

Mode)
Since the event handler changes the radius of the Circle objects, the above output assumes
that this was the first time either button was pressed. On later presses, the “Original Circle”
will reflect the radius from the previous invocation.
34
© 2010 Marty Hall
JsArray
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.
Idea
• Problem with last example

N
umber of circles in array was hardcoded into event
handler. If JavaScript changed, Java code could easily be
out of sync.
out

of

sync.
– But, you cannot treat JavaScript array as Java array
• Solution
– You can treat JavaScript array as JsArray<OverlayType>
– JsArray has length method (not field)
Mi d fi i i

Mi
nor
d
e
fi
c
i
enc
i
es
– JsArray does not implement Iterable

So you cannot use for(
BlahType
b:
jsArrayOfBlahs
) { }

So

you

cannot

use

for(
BlahType
b:

jsArrayOfBlahs
)

{

}

– You must say JsArray<RealOverlayType>
• Not JsArray<InterfaceType>
36
Method to Return JsArray
private native Circle getCircle(int i) /*-{
return $
wnd circles
[i];
return

$
wnd
.
circles
[i];

}-*/;
This was method used in previous example: return one Circle at a time.
private native JsArray<JsCircle> getCircles() /*-{
return $wnd.circles;
}
-*
/;
This is new and improved version: return entire array
}
/;
This is new and improved version: return entire array
.
37
Event Handler
private class CircleAreaHandler2
implements
ClickHandler
{
implements

ClickHandler
{
public void onClick(ClickEvent event) {
JsArray<JsCircle> circles = getCircles();
for(int i=0;i<
circles length
();i++) {
for(int

i=0;

i<
circles
.
length
();

i++)

{
Circle circle = circles.get(i);
showCircleAlert(circle);
}
}
}
}
38
Results (Development Mode)
Again, since the event handler changes the radius of the Circle objects, the above output
assumes that this was the first time either button was pressed. On later presses, the “Original
Circle” will reflect the radius from the previous invocation.
39
© 2010 Marty Hall
Calling Java from
Calling

Java

from

JavaScri
p
t
p
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.
Calling Java from JavaScript:
Overview
Overview
• Follows Java Native Interface (JNI) format
S h D il JNI f GWT d

S
ummary
h
ere.
D
eta
il
s: see
JNI
re
f
erence or
GWT

d
ocs.
• Format for static methods

@className::methodName(paramSignature)(args)
@className::methodName(paramSignature)(args)
• className: fully qualified name
• methodName: normal name

paramSignature:JNI parameter signature (see next page)
paramSignature:

JNI

parameter

signature

(see

next

page)
• args: argument names
• Format for instance methods
thi @ l N th dN ( Si t )( )

thi
s.
@
c
l
ass
N
ame::me
th
o
dN
ame
(
param
Si
gna
t
ure
)(
args
)
– obj.@className::methodName(paramSignature)(args)
• obj must be passed in from Java
• Format for field access
– obj.@className::fieldName
41
Parameter Si
g
natures
g
• Separated by semicolons, not commas

Special format for types (copied from JNI)

Special

format

for

types

(copied

from

JNI)
Real Type Param Sig
boolean
Z
boolean
Z
int I
double D
String
Ljava/lang/String
E l
String
Ljava/lang/String
BlahObject Lpackage1/package2/BlahObject
blah[] [sig

E
xamp
l
e
– Real method (class is test.client.SomeClass)
• public double foo(double d, String s) { ...}
JSNI ll

JSNI
ca
ll
• var value =
this.@test.client.SomeClass::foo(D; Ljava/lang/String)(2.5, "hi");
42
Calling Java from JavaScript:
Example
Example
private class TextfieldHandler implements KeyUpHandler {
public void
onKeyUp
(
KeyUpEvent
event) {
public

void

onKeyUp
(
KeyUpEvent
event)

{
String text = textfield.getText();
resultArea.setHTML(text);
if(
text equalsIgnoreCase
("test1")) {
if(
text
.
equalsIgnoreCase
("test1"))

{
alert1(text);
} else if(text.equalsIgnoreCase("test2")) {
hi hli ht1("
ltID
")
hi
g
hli
g
ht1("
resu
ltID
")
;
} else if(text.equalsIgnoreCase("test3")) {
highlight2("resultID", text);
}
}
}
}
43
Calling Java from JavaScript:
Example (Continued)
Example

(Continued)
private double randomTime(double n) {
return(
Math.random
()
*
n);
return(
Math.random
()

n);
}
private void alert2(String text) {
Window.alert("Value: " + text);
}
i t ti id hi hli ht2(St i id St i t t)/*
{
pr
i
va
t
e na
ti
ve vo
id

hi
g
hli
g
ht2(St
r
i
ng
id
,
St
r
i
ng
t
ex
t)

/*
-
{
var time =
this.@coreservlets.client.GwtJsniApp::randomTime(D)(10);
this.@coreservlets.client.GwtJsniApp
::alert2
this.@coreservlets.client.GwtJsniApp
::alert2
(Ljava/lang/String;)(text);
new $wnd.Effect.Highlight(id, { duration: time});
new $wnd.Effect.Shake(id, { duration: time});
}-*/;
44
Calling Java from JavaScript:
Example:Results
(
Devel
Mode)
Example:

Results
(
Devel
.
Mode)
45
© 2010 Marty Hall
Wrap-Up
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.
Summary
• Approach
– Declare final native
– Enclose body in /*-{ … }-*/;
Use $
wnd
to access window object

Use

$
wnd
to

access

window

object
– Use JNI format to call Java from JavaScript

Example
Example
private native void alert1(String message) /*-{
$wnd.alert(message);
}
*/
}
-
*/
;
• Purposes

Mostly for wrapping existing JavaScript
libraries or
Mostly

for

wrapping

existing

JavaScript

libraries

or

handling non-RPC JSON server response data
• Most standard JS tasks can be done directly in GWT
47
© 2010 Marty Hall
Questions?
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.
Developed and taught by well-known author and developer. At public venues or onsite at your location.