Hi,
I am creating an application which requires a listview with items coming from an external xml datasource.
This is what my datasource looks like:
A preview of the returned XML can be found in attachment. (I want to create a listitem per expeseFrom).
The listview is created when the view is initalized. Here is the code:
The expenseFormList is an empty unordered list inside my view. The expenseFrom-template looks like this:
This all works except when I include "kendo.data.min.js". When I include the file, the items in the list are not rendered and no error message is provided in Chrome Developers Tools. The same issue also occured when I tried to follow the listview with pull-to-refresh tutorial: no items when the file was included.
I have to include the JavaScript file for a Kendo dropdownlist, somewhere else in my application.
What should I do?
Thanks!
I am creating an application which requires a listview with items coming from an external xml datasource.
This is what my datasource looks like:
01.var expenseFormDataSource = new kendo.data.DataSource({02. transport: {03. read: {04. url: EA.baseURL + "resources/expenseService/getExpenseForms",05. dataType: "xml",06. type: "POST"07. },08. parameterMap: function(options) {09. return {10. token: EA.getToken()11. };12. }13. },14. schema: {15. type: "xml",16. data: "expenseForms/expenseForm",17. model: {18. fields: {19. id: "id/text()",20. date: "date/text()",21. statusId: "statusId/text()"22. }23. }24. }25. });The listview is created when the view is initalized. Here is the code:
1.$("#expenseFormList").kendoMobileListView({2. dataSource: expenseFormDataSource,3. pullToRefresh: true,4. template: $("#expenseForm-template").text()5. });1.<script id="expenseForm-template" type="text/x-kendo-template">2. <a data-role="listview-link" id=#="\"my-expenses-show-pdf-" + id+ "\""#>3. <div class="expenseForm-date">#= kendo.toString(new Date(Date.parse(date)), "dd/MM/yyyy") #</div>4. <div class="expenseForm-status">Status: #= expenseStatusIdToString(statusId) #</div>5. </a>6.</script>I have to include the JavaScript file for a Kendo dropdownlist, somewhere else in my application.
What should I do?
Thanks!