Presentation is loading. Please wait.

Presentation is loading. Please wait.

JDojo and Its Usage Te-Hsin Shih 04/30/2013. Dojo Dojo Toolkit is an open source JavaScript library designed to ease the rapid development of cross-platform,

Similar presentations


Presentation on theme: "JDojo and Its Usage Te-Hsin Shih 04/30/2013. Dojo Dojo Toolkit is an open source JavaScript library designed to ease the rapid development of cross-platform,"— Presentation transcript:

1 JDojo and Its Usage Te-Hsin Shih 04/30/2013

2 Dojo Dojo Toolkit is an open source JavaScript library designed to ease the rapid development of cross-platform, JavaScript/Ajax-based applications and web sites. DoJo example // Load Dojo's code relating to the Button widget dojo.require("dijit.form.Button"); Hello World!

3 JDojo JDojo is a toolkit that allows the developer to use Java language to control Dojo widgets. JDojo toolkit translates the Java code into Java scripts. JDojo group has been quite since 2010. Don’t know what is its future.

4 JDojo Example WebEditor.java public class WebEditor extends _Widget implements _Templated { public void postCreate() { CreateEclipseEditorParms parms = new CreateEclipseEditorParms(); parms.parent = this; editor = utilNative.createEclipseEditor(parms); editor.setContents("Hellow World!!"); } WebEditor.js dojo.declare("com.ibm.team.scm.web.ui.internal.widgets.dojoWebEditor.WebEditor", [ _Widget, _Templated], { postCreate: function() { var parms= {}; parms.parent= this; this.editor= utilNative.createEclipseEditor(parms); this.editor.setContents("Hellow World!!"); } }); })();

5 JDojo Special Syntaxes The “native” keyword – the native keyword in JDojo means the implementation of the method is in the JavaScript file. public class Editor extends DojoObject { public Editor(Object params) { } public void onInputChange(String title, String message, String contents, boolean contentsSaved) {... } public native void setContents(String contents); }

6 JDojo Special Syntaxes @Stub annotation – it means do not generate JavaScript file from this class. @Stub public class utilNative { public static Editor createEclipseEditor (CreateEclipseEditorParms parms) { return null; }

7 References Install JDojo toolkits to eclipse client – http://jazzweb.beaverton.ibm.com/foundati on/tools/devtools-updatesite http://jazzweb.beaverton.ibm.com/foundati on/tools/devtools-updatesite https://jazz.net/wiki/bin/view/Main/JDojo

8 Discussions Limitations on Java features that can be used in JDoJo classes.


Download ppt "JDojo and Its Usage Te-Hsin Shih 04/30/2013. Dojo Dojo Toolkit is an open source JavaScript library designed to ease the rapid development of cross-platform,"

Similar presentations


Ads by Google