or
<!DOCTYPE html>
<
html
>
<
head
>
<
title
></
title
>
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=UTF-8"
>
<
meta
name
=
"msapplication-tap-highlight"
content
=
"no"
/>
<!-- Kendo UI Mobile CSS -->
<
link
href
=
"styles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"styles/kendo.default.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"styles/kendo.mobile.all.min.css"
rel
=
"stylesheet"
/>
<!-- jQuery JavaScript -->
<
script
src
=
"http://code.jquery.com/jquery-1.10.2.js"
></
script
>
<!-- Kendo UI Mobile combined JavaScript -->
<
script
src
=
"js/kendo.all.js"
></
script
>
</
head
>
<
body
id
=
"body"
>
<
div
data-role
=
"layout"
data-id
=
"default"
>
<
div
data-role
=
"header"
>
<
div
data-role
=
"navbar"
>
<
span
data-role
=
"view-title"
></
span
>
</
div
>
</
div
>
</
div
>
<
div
data-role
=
"view"
data-title
=
"Select Test"
data-model
=
"myViewModel"
data-layout
=
"default"
id
=
"roster"
>
<
table
>
<
tr
>
<
td
>Selected Person: <
span
data-bind
=
"text: selectedPerson"
></
span
>
</
tr
>
<
tr
>
<!--<td><label> DataSource Select <select data-value-field="id" data-text-field="name" data-bind="source: dsPeople, value: selectedPerson"></select></label></td>-->
<
td
>
<
label
> Array Select
<
select
data-bound
=
"onBind"
data-option-label
=
"Select an item"
data-value-field
=
"id"
data-text-field
=
"name"
data-bind
=
"source: arrPeople, value: selectedPerson, events: { bound: onBind}"
data-value-primitive
=
"true"
>
<
option
value
=
"-1"
>Select an item</
option
>
</
select
>
</
label
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
script
>
var myViewModel = kendo.observable({
dsPeople: new kendo.data.DataSource({
data: [],
schema: {
model: {
id: "id"
}
}
}),
arrPeople: [],
init: function()
{
for (var i = 0; i <
5
; i++) {
var person = {
name: "Person " + i,
id: i
};
this.dsPeople.add(person);
this.arrPeople.push(person);
}
},
onBind: function(e)
{
alert('onBind called');
},
selectedPerson: null
});
$.ready(myViewModel.init());
// Initialize a new Kendo Mobile Application
var
kidcheck
=
new
kendo.mobile.Application($(document.body), {
skin: "flat"
});
</script>
</
body
>
</
html
>
var check = new XMLHttpRequest();
check.open("GET", "https://IP:PORT/test" ,false);
check.setRequestHeader("Authorization", utils.getServerAuthString());
check.onreadystatechange = function () {
if (check.readyState == 4) {
if (check.status == 200) {
utils.saveServerData();
} else {
utils.showError("status:" + check.status);
}
}
}
check.send(null);
viewModel: kendo.observable({
datasource:
new
kendo.data.DataSource({
transport: {
read: {
cache:
false
,
url: URL,
dataType:
"json"
,
beforeSend:
function
(req) {
req.setRequestHeader(
'Authorization'
, utils.getServerAuthString());
}
}
}
})
})
<
script
type
=
"text/x-kendo-template"
id
=
"${attribute.name}-template"
>
<
div
class
=
"${attribute.name}-tabstrip"
>
<
ul
>
<
c:forEach
var
=
"attributeGroup"
items
=
"${mlib:attributeGroupSortByName(attribute.definition.templateObject.attributeGroups)}"
varStatus
=
"stat"
>
<
li
<c:if
test
=
"${stat.index == 0}"
>class="k-state-active"</
c:if
>>${attributeGroup.name}</
li
>
</
c:forEach
>
</
ul
>
<
c:forEach
var
=
"ag"
items
=
"${attribute.definition.templateObject.attributeGroups}"
>
<
div
>
<
ul
>
<
c:forEach
var
=
"attribute"
items
=
"${mlib:sortAttributesByOrder(ag.attributes)}"
>
<
li
><
label
>${attribute.definition.desc.text}:</
label
>#= ${attribute.name} #</
li
>
</
c:forEach
>
</
ul
>
</
div
>
</
c:forEach
>
</
div
>
</
script
>
detailTemplate: kendo.template($(
"#class_refs-template"
).html()),
detailInit:
function
( e ) {
var
detailRow = e.detailRow;
detailRow.find(
".class_refs-tabstrip"
).kendoTabStrip({
animation: {
open: {
effects:
"fadeIn"
}
}
});
}
<
div
class
=
"class_refs-tabstrip"
>
<
ul
>
<
li
class
=
"k-state-active"
>Header Description</
li
>
<
li
>Others</
li
>
<
li
>system</
li
>
</
ul
>
<
div
>
<
ul
>
<
li
><
label
>Description:</
label
> #= foo# </
li
>
<
li
><
label
>Description:</
label
> #= bar# </
li
>
<
li
><
label
>Description:</
label
> #= foo# </
li
>
<
li
><
label
>Description:</
label
> #= foo# </
li
>
<
li
><
label
>Description:</
label
> #= foo# </
li
>
<
li
><
label
>Description:</
label
> #= foo# </
li
>
<
li
><
label
>Description:</
label
> #= bar# </
li
>
<
li
><
label
>Description:</
label
> #= foo# </
li
>
</
ul
>
</
div
>
...