I am creating a sample application using Dojo Mobile 1.9 and Worklight 6.0.0. I am following Jim Zhang's instructional YouTube video (snkUTBVxLBw), in it widgets are dragged and dropped from the palette to the rich page editor.
The problem is, graphics do not display when using the rich page editor in Worklight 6.0.0.20130926 (with Dojo Mobile 1.9) but they do display in Worklight 5.0.6. I have duplicated this with other projects.
What do I need to do to get the graphics to show up for Dojo Mobile in Worklight 6.0.0?
Image of success in Worklight 5.0.6:
Image of failure in Worklight 6.0.0:
Additional notes, this problem occurs on a Mac 10.7.5, it does not occur on my Windows 7 machine. Further, it occurs both in the rich page editor, and when the application runs in from the server in the browser.
When running in the browser, the following error appear in the console: [14:38:49.128] GET http://my.ip.address:10080/IBMDojoTutorial6/www/dojo/dojo.js [HTTP/1.1 404 Not Found 37ms]
Reviewing the Eclipse console, a similar error appeared: [WARNING ] SRVE0190E: File not found: /www/dojo/dojo.js [ERROR ] FWLSE0048E: Unhandled exception caught: SRVE0190E: File not found: /www/dojo/dojo.js [project IBMDojoTutorial6] SRVE0190E: File not found: /www/dojo/dojo.js
So I guess the question becomes, how do I include the missing dojo.js file? (And why was it not included?)
New information 10/30/2013 I tried the steps in in Billy Rowe's answer to IBM Worklight 6.0 - Unable to run sample hybrid worklight app using dojo toolkit for android environment on avd?
I tried checking and unchecking Provide Library Resources, as described, with no apparent change.
However, I did make a change that seems to provide a solution or a workaround. I created a new project, and on the Add Dojo Toolkit dialog, instead of the default dojoLib, I selected New Dojo Library, named my own library Dojo19 and pointed at Dojo Toolkit 1.9 for Worklight. When I link to this new named Dojo library, the Dojo Graphics are present in the editor, they show up in the preview console, and they show up in the simulator.
Note in the image below the two Dojo libraries: Dojo19 (my new library) and dojoLib (the default library. Dojo19 has JavaScript resource, where dojoLib does not. I did nothing special to cause them to be there.
I have successfully created two projects and they now each work with Dojo19. However, even when I point the old failing projects to Dojo19, they still fail. The questions remain:
- How do I get these old projects to work with Dojo?
- Why did my workaround work?
- Why is there an extra javascript folder in the working Dojo, that was not present in the original Dojo library?