data
data-dojo-props ='url:“”似乎无法在Windows Phone 8.1上运行(data-dojo-props='url:“ ”' seems not working on windows phone 8.1)我制作了一个简单的移动应用程序(使用IBM Worklight Studio 6.1.0.01-20140917-1250)。 我为这个应用程序添加了Dojo(使用dojo 1.9.3FeP)功能。 我首先为Android和IOS构建。 当两者都工作时,我添加Windows Phone 8。
构建应用程序并在Windows 8.1模拟器(通过Visual Studio 2013 Professional)和Windows Phone 8.1上测试它。
我注意到使用data-dojo-props='url:""'浏览新视图的List视图不起作用。
代码剪断如下;
的index.html
<!DOCTYPE HTML><html> <head> <meta charset="UTF-8"> <title>index</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <link rel="shortcut icon" href="images/favicon.png"> <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> <link rel="stylesheet" href="css/main.css"> <script>window.$ = window.jQuery = WLJQ;</script> <script type="text/javascript" src="dojox/mobile/deviceTheme.js"></script> <script type="text/javascript" data-dojo-config="isDebug: false, async: true, parseOnLoad: true, mblHideAddressBar: false" src="dojo/dojo.js"></script> </head> <body style="display: none;"> <div data-dojo-type="dojox.mobile.View" id="view1" data-dojo-props="selected:true"> <!--application UI goes here--> Hello Worklight <br><hr><br> <div data-dojo-type="dojox.mobile.RoundRectList" > <div data-dojo-type="dojox.mobile.ListItem" data-dojo-props="label:'Item 1',url:'Page1.html',transition:'slide',dir:'1'"></div> <div data-dojo-type="dojox.mobile.ListItem" data-dojo-props="label:'Item 2',moveTo:'view2',transition:'slide',dir:'1'"></div> </div> <div data-dojo-type="dojox.mobile.View" id="view2" data-dojo-props="selected:false"> Hello form View 1. </div> <script src="js/initOptions.js"></script> <script src="js/main.js"></script> <script src="js/messages.js"></script> </body></html>Page1.html
<div data-dojo-type="dojox.mobile.View" id="p1V1" > <br><hr><span>Hello from Page 1 View 1</span><br><hr> <div data-dojo-type="dojox.mobile.RoundRectList"> <div data-dojo-type="dojox.mobile.ListItem" data-dojo-props="label:'Item',moveTo:'view1',transition:'slide',dir:'1'"> </div> </div></div>使用worklight studio 6.1.0.01-20140917-1250在windows phone 8.1上有这个data-dojo-props='url:""'是否有任何已知问题?
更新 ------------------------------我使用相同的代码并使用带有dojo 1.10.4的IBM Mobile 7进行构建。 然后导入到visual studio 2012-update 4和visual studio 2013并在模拟器上测试它。 按预期工作。
如果我使用dojo 1.10.4和IBM worklight Studio 6.1.0.01-20140917-1250,构建包含这2个html文件的项目,即使在构建20分钟后也没有完成。
我比较了两个不同版本(1.9.3Fep和1.10.4)之间的dojox / mobile中的_ItemBase.js和RoundRectList.js包含。 他们的代码是一样的。
调试结果如下。
我不能在这里上传图片,因为我的声誉不到10。
I made a simple mobile app (using IBM Worklight Studio 6.1.0.01-20140917-1250). I add for this app the Dojo (using dojo 1.9.3FeP) capabilities. I build for Android and IOS first. When both are working, I add windows Phone 8.
After building the app and test it on both windows 8.1 emulator (via Visual Studio 2013 Professional) and Windows Phone 8.1.
I notice that the List view to browse new view using data-dojo-props='url:""' are not working.
Code snipped as follow;
index.html
<!DOCTYPE HTML><html> <head> <meta charset="UTF-8"> <title>index</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <link rel="shortcut icon" href="images/favicon.png"> <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> <link rel="stylesheet" href="css/main.css"> <script>window.$ = window.jQuery = WLJQ;</script> <script type="text/javascript" src="dojox/mobile/deviceTheme.js"></script> <script type="text/javascript" data-dojo-config="isDebug: false, async: true, parseOnLoad: true, mblHideAddressBar: false" src="dojo/dojo.js"></script> </head> <body style="display: none;"> <div data-dojo-type="dojox.mobile.View" id="view1" data-dojo-props="selected:true"> <!--application UI goes here--> Hello Worklight <br><hr><br> <div data-dojo-type="dojox.mobile.RoundRectList" > <div data-dojo-type="dojox.mobile.ListItem" data-dojo-props="label:'Item 1',url:'Page1.html',transition:'slide',dir:'1'"></div> <div data-dojo-type="dojox.mobile.ListItem" data-dojo-props="label:'Item 2',moveTo:'view2',transition:'slide',dir:'1'"></div> </div> <div data-dojo-type="dojox.mobile.View" id="view2" data-dojo-props="selected:false"> Hello form View 1. </div> <script src="js/initOptions.js"></script> <script src="js/main.js"></script> <script src="js/messages.js"></script> </body></html>Page1.html
<div data-dojo-type="dojox.mobile.View" id="p1V1" > <br><hr><span>Hello from Page 1 View 1</span><br><hr> <div data-dojo-type="dojox.mobile.RoundRectList"> <div data-dojo-type="dojox.mobile.ListItem" data-dojo-props="label:'Item',moveTo:'view1',transition:'slide',dir:'1'"> </div> </div></div>Is there any known issue for this data-dojo-props='url:""' at windows phone 8.1 by using worklight studio 6.1.0.01-20140917-1250?
Update ------------------------------I've use same code and build by using IBM Mobile first 7 with dojo 1.10.4. Then import to visual studio 2012-update 4 and visual studio 2013 and test it on emulator. working as expected.
If I use dojo 1.10.4 with IBM worklight Studio 6.1.0.01-20140917-1250, building the project which contains this 2 html files, not finishing even after 20 minutes of building.
I compare the _ItemBase.js and RoundRectList.js include in dojox/mobile between 2 different version (1.9.3Fep and 1.10.4). Their code are same.
The debug result is as follow.
I can't upload image at here since my reputation is less than 10.
最满意答案我知道Windows Phone 8.1 Update 1存在许多问题,我认为应该用dojo 1.10.4解决这个问题: https ://bugs.dojotoolkit.org/ticket/18540
你能检查一下dojo 1.10.4是否解决了你的问题?
After installing newer version of fix pack (IBM Worklight 6.1.02-20150725) from IBM Fixcentral and rebuilt, it work.
My previous answer include link for fix pack to download but deleted as therefore, please find at search engine for download link.