Hi experts,
I'm new to Icenium and Kendo UI Mobile. What I'm doing is passing a value from one listview to another view. In the second view I wanted to show some other details based on the passed parameter. I tried the below but seems not working. Can anyone help????
my html
<!--Job Summary-->
<div class="buttonArea">
<input type="submit" id="logout" data-role="button" data-bind="click: onLogout, visible: isLoggedIn" class="login-button" value="Logout" />
</div>
<div data-role="view" id="tabstrip-summary" data-title="Job Summary" data-show="showAssignJob">
<div class="buttonArea">
<ul id="jobassignList" class="list-content"
data-source="jobAssignData"
data-endlessScroll="true"
data-template="jobassignTemplate"
data-role="listview"
data-style="inset" data-pull-to-refresh="true" data-fixed-headers="true">
</ul>
</div>
</div>
<!--Job assign template-->
<script id="jobassignTemplate" type="text/x-kendo-template">
<div>
<a href="\#jobupdateview?jb=#:data.JobNo#"
class="km-listview-link"
data-role="listview-link">
<h2>Pickup: \##=data.JobNo#</h2>
</a>
</div>
</script>
<!--Job update-->
<div id="jobupdateview" data-role="view" data-title="Job Update" data-show="showUpdateJob">
<div class="buttonArea">
<ul id="jobUpdateList" class="list-header" data-source="jobUpdateData" data-template="jobUpdateTemplate" data-role="listview"></ul>
</div>
</div>
<!--Job Update template-->
<script id="jobUpdateTemplate" type="text/x-kendo-template">
#= renderStatusTemplate(data.JobNo) #
<h3>Pickup: Job\# #=data.JobNo#</h3>
</script>
my js file.
function showUpdateJob(e) {
view = e.view;
var jbn = view.params.jb.toString();
alert(jbn); //value coming correctly
var jobUpdateData = new kendo.data.DataSource(
{
transport: {
read: {
url: varURL + "GetDispatchItem/TD001/OFD/" + jbn, //here I'm passing data to wcf
data: {
Accept: "application/json"
}
}
},
filter: { filters: [{ field: "JobNo", operator: "eq", value: jbn}] }
});
var jobUpdateTemplate = kendo.template($("#jobUpdateTemplate").text());
jobUpdateData.fetch(function () {
var jb =jobUpdateData.at(0);
view.scrolllerContent.html(jobUpdateTemplate(item));
kendo.mobile.init(view.content);
});
}
I'm new to Icenium and Kendo UI Mobile. What I'm doing is passing a value from one listview to another view. In the second view I wanted to show some other details based on the passed parameter. I tried the below but seems not working. Can anyone help????
my html
<!--Job Summary-->
<div class="buttonArea">
<input type="submit" id="logout" data-role="button" data-bind="click: onLogout, visible: isLoggedIn" class="login-button" value="Logout" />
</div>
<div data-role="view" id="tabstrip-summary" data-title="Job Summary" data-show="showAssignJob">
<div class="buttonArea">
<ul id="jobassignList" class="list-content"
data-source="jobAssignData"
data-endlessScroll="true"
data-template="jobassignTemplate"
data-role="listview"
data-style="inset" data-pull-to-refresh="true" data-fixed-headers="true">
</ul>
</div>
</div>
<!--Job assign template-->
<script id="jobassignTemplate" type="text/x-kendo-template">
<div>
<a href="\#jobupdateview?jb=#:data.JobNo#"
class="km-listview-link"
data-role="listview-link">
<h2>Pickup: \##=data.JobNo#</h2>
</a>
</div>
</script>
<!--Job update-->
<div id="jobupdateview" data-role="view" data-title="Job Update" data-show="showUpdateJob">
<div class="buttonArea">
<ul id="jobUpdateList" class="list-header" data-source="jobUpdateData" data-template="jobUpdateTemplate" data-role="listview"></ul>
</div>
</div>
<!--Job Update template-->
<script id="jobUpdateTemplate" type="text/x-kendo-template">
#= renderStatusTemplate(data.JobNo) #
<h3>Pickup: Job\# #=data.JobNo#</h3>
</script>
my js file.
function showUpdateJob(e) {
view = e.view;
var jbn = view.params.jb.toString();
alert(jbn); //value coming correctly
var jobUpdateData = new kendo.data.DataSource(
{
transport: {
read: {
url: varURL + "GetDispatchItem/TD001/OFD/" + jbn, //here I'm passing data to wcf
data: {
Accept: "application/json"
}
}
},
filter: { filters: [{ field: "JobNo", operator: "eq", value: jbn}] }
});
var jobUpdateTemplate = kendo.template($("#jobUpdateTemplate").text());
jobUpdateData.fetch(function () {
var jb =jobUpdateData.at(0);
view.scrolllerContent.html(jobUpdateTemplate(item));
kendo.mobile.init(view.content);
});
}