User`s guide

// for us to do.
var exists = query("link[href='" + path + "']", headNode);
if (exists.length > 0) {
return;
}
// Create the link and add it to the Web page.
domConstruct.create("link", {
"rel": "stylesheet",
"type": "text/css",
"href": path
}, headNode, "last");
} // End of insertModuleCSS
what it does is take the module path to a CSS file and convert that to a URL path. We then look
within the <head> of our current document to see if we have a <link> that already loads this
entry. If we don't then we add a <link> to load it.
Dojo Development with IID
IID can be used to develop Dojo based applications. It provides an Ajax server that provides real-
time access to changes made in scripts and HTML. What this means is that a change in a source
file does not need to go through a deployment step to test it out. This is in-line with JavaScript and
Dojo programming styles and techniques.
To deploy an application to the Ajax server we need to create a "Static Web Project". This is as
opposed to a "Dynamic Web Project" which is really a Java EE WAR file.
When it comes time to deploy a project to a WAS server for execution, we need to create a
Dynamic Web Project but this then poses a challenge. The dynamic web project and the static web
project appear to have distinct source trees and hence keeping the two projects in synch can be an
issue. One solution is to choose one project and then create a Windows level hard-link at the file
system level linking together the two file trees.
Imagine we have a directory called:
C:\MyRoot\DynamicProject\WebContent\MySource
in which the source of our work is kept.
Now imagine we have a directory called:
C:\MyRoot\StaticWebProject\WebContent
we want this to also contain the source as it is to be used by the Static Web project.
The Windows "mklink" command can be used:
mklink /J C:\MyRoot\StaticWebProject\WebContent\MySource
C:\MyRoot\DynamicProject\WebContent\MySource
Notes:
Make sure that if there are spaces in the directory names then the directory is surrounded by
quotes.
The first parameter is the directory to be created while the second is the link source.
Next, issue a refresh in the IID Eclipse framework of the file system structure and now we have
both projects sharing the same source tree. An edit to a file in one project will edit the same file in
the other project (they are the same file). It is recommended to take backups just in case you make
a mistake.
Adding the Dojo Project Facet
From the project properties, we can add the Dojo factet:
Page 220