Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Dojo usage on the Phobos server side... (See related posts)

Dojo usage on the Phobos server side...
The key api is the library.dojo.load() call

// server-side dojo test script

response.status = 200;
response.contentType = "text/html";
writer = response.getWriter();
writer.println("<html><head><title>Dojo Sample</title></head><body>");

library.dojo.load();
dojo.require("dojo.lang.*");
try {
    dojo.lang.assert (1==2," 1 is equals to 1");
    writer.println("OK: 1 is equals to 1");
    }catch (e){
    writer.println(e.message);
    
}
dojo.require("dojo.date.common");

writer.println( "<br>dojo.date.getWeekOfYear returns "+dojo.date.getWeekOfYear(new Date()));
writer.println("</body></html>");
writer.flush();



You need to create an account or log in to post comments to this site.


Click here to browse all 4834 code snippets

Related Posts