IBM Worklight与Dojo Toolkit | dojo / main.js 404未找到问题 [英] IBM Worklight with Dojo Toolkit | dojo/main.js 404 not found issue

查看:122
本文介绍了IBM Worklight与Dojo Toolkit | dojo / main.js 404未找到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我开始探索IBM Worklight,它看起来很有希望构建混合移动应用程序,为此,创建了一个Worklight项目,同时选择Dojo Toolkit作为默认框架选择,并看到缺少​​的dojo / main.js



以下是HTML代码:

 <! DOCTYPE HTML> 
< html>
< head>
< title> TD_Mobile< / title>
< meta http-equiv =Content-Typecontent =text / html; charset = ISO-8859-1>
< meta name =viewport
content =width = device-width,initial-scale = 1.0,maximum-scale = 1.0,minimum-scale = 1.0,user-scalable = 0 ;
< meta name =apple-mobile-web-app-capablecontent =yes>

< script src =dojo / dojo.jsdata-dojo-config =isDebug:false,parseOnLoad:true,async:false>< / script>

< link rel =stylesheethref =css / TD_Mobile.css>
< / head>
< body id =contentstyle =display:none;>
< div data-dojo-type =dojox.mobile.ScrollableViewid =view0
data-dojo-props =selected:true>< / div>

TD_Mobile
<! - 应用程序UI在这里 - >
< script src =js / initOptions.js>< / script>
< script src =js / TD_Mobile.js>< / script>
< script src =js / messages.js>< / script>
< / body>
< / html>

当我从工作台控制台中构建和部署并运行项目作为常见资源时,必须看到main.js在以下路径中找不到问题 http:// localhost:8080 / apps / services / preview / TD_Mobile / common / 1.0 / default / dojo / main.js



令我惊讶的是,我能够在 C:\Users\marif\workspace\ WorklightServerHome\TD Mobile New\widget-resources\TD_Mobile-common-e6cd3d9088c88e96df743ed1c9a1b584a90da8c9\preview\default\dojo 并且没有看到main.js和一些更多的JS文件。 / p>

看起来像最终部署的构建无法正常工作,将会感激任何快速指针。

解决方案

并不是所有的文件都包含在dojo构建中,在你的项目中有一个名为build-dojo.xml的文件。
添加main.js。



< patternset id =dojo.resources.loose-modules> 添加要使用的模块。


I have recently started exploring IBM Worklight which looks really promising to build hybrid mobile apps, in order to do so, created a Worklight project while choosing Dojo Toolkit as a default framework choice and got to see the missing dojo/main.js issue.

Here is the HTML code:

<!DOCTYPE HTML>
<html>
<head>
<title>TD_Mobile</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport"
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">

    <script src="dojo/dojo.js" data-dojo-config="isDebug: false, parseOnLoad: true, async: false"></script>

<link rel="stylesheet" href="css/TD_Mobile.css">
</head>
<body id="content" style="display: none;">
    <div data-dojo-type="dojox.mobile.ScrollableView" id="view0"
        data-dojo-props="selected:true"></div>

TD_Mobile
    <!--application UI goes here-->
    <script src="js/initOptions.js"></script>
    <script src="js/TD_Mobile.js"></script>
    <script src="js/messages.js"></script>
</body>
</html>

When I do build and deploy and run the project from worklight console as a common resource, got to see the main.js not found issue at the following path http://localhost:8080/apps/services/preview/TD_Mobile/common/1.0/default/dojo/main.js

And to my surprise further, I was able to search the reference folder at C:\Users\marif\workspace\WorklightServerHome\TD Mobile New\widget-resources\TD_Mobile-common-e6cd3d9088c88e96df743ed1c9a1b584a90da8c9\preview\default\dojo and don't see main.js and some more JS files there.

Looks like final deployed build somehow not working properly, would appreciate for any quick pointer.

解决方案

Not all files are included in the dojo build, there is a file called build-dojo.xml in your project. Add main.js to it.

Under <patternset id="dojo.resources.loose-modules"> add the modules you want to use.

这篇关于IBM Worklight与Dojo Toolkit | dojo / main.js 404未找到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆