Dojo with Diffable

8 views
Skip to first unread message

dojo

unread,
Oct 23, 2010, 12:42:44 AM10/23/10
to Diffable
Hi

I am trying to use diffable for dojo tool kit. I am able to load the
javascript files. but the javascript files used in JSPs internally
calls other javascript files, in dojo, they were specified as
dojo.Form.form.

Can you pls tell us how to load that files thro diffable ?

Thanks

Joshua Harrison

unread,
Oct 23, 2010, 3:06:03 AM10/23/10
to Diffable
Hello,

If I remember correctly (it's been a long while) Dojo has it's own
package import system for lazy loading other scripts. Because
Diffable also contains a package loading system, they do not
immediately play well together. The way I see it, there are two
options:

1.) You can modify the Dojo code to load your Dojo scripts using the
Diffable servlet. This would involve putting all of the Dojo
Javascript code in your resource folder, and then modifying the Dojo
package loader to append the Diffable servlet prefix to package URLs.
This assumes that Dojo lazy loads packages using script tags. I would
have to dig further into this to speak with authority.

2.) You can flatten the Dojo files into a single script file. I am
not sure exactly how this would work, but I would bet the Dojo package
loader could be made to skip import calls if the namespace/functions
already exist on the page, as it would if the package had already been
loaded.

Does this answer your question? I will be quite busy for the next
week or so, but after that I would be more than happy to help you look
at this more as I think it'd be great to have such a popular library
load easily using Diffable.

Thanks again,
Joshua

dojo

unread,
Oct 23, 2010, 4:41:18 PM10/23/10
to Diffable
Hi Joshua,

We are using Dojo 1.5. Dojo Toolkit can be downloaded at
http://download.dojotoolkit.org/release-1.5.0/dojo-release-1.5.0.zip

I have sent you the sample JSP separately to you.

As I mentioned earlier, our web.xml is like below for ResourceFolders

<param-name>ResourceFolders</param-name>
<param-value>js/dojotoolkit</param-value>

Thanks alot for your time.
Reply all
Reply to author
Forward
0 new messages