效果如下,点击后左侧Navigator Bar刷新

init显示的代码:

[html] view plain copy

[html] view plain copy

模板函数

[javascript] view plain copy

#= MetricName #

#= HostName #

View

Next

然后是初始化时的载入函数(mobileListViewTemplatesInit)

[javascript] view plain copy

var metricNode = new kendo.data.DataSource({

transport: {

read: {

// the remote service url

url:"http://localhost:3458/EmiteDataService/Nodes",

// JSONP is required for cross-domain AJAX

dataType: "jsonp",

// additional parameters sent to the remote service

data: {

userName:function(){

return 'admin';

},

userDomain:function(){

return 'admin';

},

status:function(){

return  $('#metricStatus').val()

}

}

}

},

// describe the result format

schema: {

// the data which the data source will be bound to is in the "results" field

data: ""

},

change: function() { // subscribe to the CHANGE event of the data source

//alert($('#metricId').val());

/*$("#tweets").html(kendo.render(template, this.view()));*/

}

});

function mobileListViewTemplatesInit() {

$("#custom-listview").kendoMobileListView({

dataSource:metricNode,

template: $("#customListViewTemplate").html()

});

}

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐