How do I use Dojo inside of Worklight correctly?

流过昼夜 提交于 2019-12-04 19:36:41

My best guess based on the info you've given is that Page2.html is not really inside Test.html and its a new page. In this case you will need to have the script references in Page2 as well.

If you're testing your code in a web browser you can view the Console and hopefully gain some insight as to what exactly is going wrong.

You can also try working with the Worklight logger to help locate the problem. http://wpcertification.blogspot.com/2012/03/enabling-debuglog-console-in-worklight.html

Here is a general link for "Problem Determination" from IBM as well http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.worklight/worklight/5.0/Problem_Determination/IMFV50_ProblemDetermination/player.html

As Nick said if you load totally different HTML page you will have that page to declare the classes your are using. In dojox/mobile/tests see test_IconContainer.html for example.

That said you could proceed differently by for example having your alternate views defined in the same HTML or as your are in Worklight by using the fragment mechanism (see https://www.ibm.com/developerworks/mobile/worklight/getting-started/ modules 60.1, 2 and 3).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!