简体   繁体   English

IBM Worklight [Windows Phone 8]:列表视图使用麻烦

[英]IBM Worklight [Windows phone 8]: list view uses trouble

My working Environment: 我的工作环境:

Ecllipse 日蚀

IBM Worklight 6.1 IBM Worklight 6.1

Processor : intel i3 处理器:Intel i3

OS: windows 8 (Enterprise edition) 操作系统:Windows 8(企业版)

Code is generated using Phone GAP [HTML5 and Javascript] 使用电话GAP [HTML5和Javascript]生成代码

Following is my code from my project with error: 以下是我的项目中出现错误的代码:

我的项目代码屏幕截图

Question: 题:

Above code is working fine with Android and iOS devices so I need to confirm that windows 8 phone does not support “ListView” control? 上面的代码在Android和iOS设备上正常运行,因此我需要确认Windows 8手机不支持“ ListView”控件吗? if not then what is alternative solution for this? 如果不是,那么对此有什么替代解决方案?

I could not reproduce this error. 我无法重现此错误。
I've tested the below in Windows Phone 8 using a Worklight project (with jQuery Mobile 1.4.3); 我已经使用Worklight项目(使用jQuery Mobile 1.4.3)在Windows Phone 8中测试了以下内容; everything is working... 一切正常...

Additionally, see @vishal_g's comment. 此外,请参阅@vishal_g的注释。

HTML 的HTML

<!DOCTYPE HTML>
<html>
    <head>
        ...
        ...
        <link href="jqueryMobile/jquery.mobile-1.4.3.css" rel="stylesheet">
        <link rel="stylesheet" href="css/main.css">
        <script>window.$ = window.jQuery = WLJQ;</script>
        <script src="jqueryMobile/jquery.mobile-1.4.3.js"></script>
    </head>
    <body style="display: none;">
        <div data-role="page" id="page">
            <div data-role="content" style="padding: 15px">
                <ul data-role="listview" id="list" data-autodividers="true">
                    <li><a href="#">Adele</a></li>
                    <li><a href="#">Agnes</a></li>
                    <li><a href="#">Billy</a></li>
                    <li><a href="#">Calvin</a></li>
                </ul>
            </div>
            <button onclick="emptyList()">empty list</button>

        </div>
        <script src="js/initOptions.js"></script>
        <script src="js/main.js"></script>
        <script src="js/messages.js"></script>
    </body>
</html>

JavaScript 的JavaScript

function wlCommonInit(){

}

function emptyList() {
    $("#list").listview().empty();
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM