0

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: enter image description here

Image of failure in Worklight 6.0.0: enter image description here

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?

using new private Dojo19 library

Community
  • 1
  • 1
Brian Cragun
  • 680
  • 8
  • 13
  • try one of these free image hosting sites: http://www.imageshack.us | http://www.tinypic.com or http://www.photobucket.com - and post a link to your image please – Joe Oct 09 '13 at 19:55
  • Joe, thanks for that suggestion. I have not yet found a solution, and have uploaded images. – Brian Cragun Oct 29 '13 at 18:03
  • looks like a dojo parse error. is there anything interesting in the JavaScript console when you run this in the browser? – David Dhuyveter Oct 29 '13 at 19:11
  • David, you are correct, there were interesting messages in the consoles. Added to the question body, above. – Brian Cragun Oct 29 '13 at 19:45
  • @BrianCragun, have you ever progressed with this question further? – Idan Adar Dec 14 '14 at 19:04
  • I was never able to progress on this question, and in the meantime have changed environments. I apologize there is no resolution, here. – Brian Cragun Feb 19 '15 at 20:27
  • @BrianCragun, 1) would you prefer to /remove/ this question, then? or 2) can you supply the Worklight Studio project so it could be tested? – Idan Adar Apr 23 '15 at 08:48

1 Answers1

0

I have tested in with 5.0.6.2 and 6.0.0.201412301546.

I've created a Hybrid app with Dojo in 5.0.6.2 and added to it some widgets.
I then exported this project and imported it to 6.0.0.2; the project passed the upgrade process. After displaying the HTML file in both the RPE and Preview, all resources were there.

It would be best for you to provide the 5.0.6.2 project to inspect it.
Otherwise try uprading to the latest available 6.0.0.2 Studio iFix and try again.

Another thing to verify is that the mentioned IP address in the question is in fact the correct IP address used for the Worklight Server - otherwise it will fail. The address can then be changed in the generated index.html.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89