List view in conflict with

3 posts, 1 answers
  1. Answer
    Sander avatar
    2 posts
    Member since:
    Jan 2013

    Posted 04 Apr 2013 Link to this post


    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{
    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.    });
    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:
    2.       dataSource: expenseFormDataSource,
    3.       pullToRefresh: true,
    4.       template: $("#expenseForm-template").text()
    5.   });
    The expenseFormList is an empty unordered list inside my view. The expenseFrom-template looks like this:
    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>
    This all works except when I include "".  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? 

  2. Alexander Valchev
    Alexander Valchev avatar
    2873 posts

    Posted 08 Apr 2013 Link to this post

    Hello Sander, contains which is why you should not include it again. To include a Kendo DropDownList in your application, from the JavaScript dependencies you need only:
    • kendo.dropdownlist.js
    • kendo.list.js

    Rest of the files are part of the
    In order to avoid any potential errors, you may use kendo.all.min.js which contains all the required files or the custom download builder tool (available only for commercial licence owners).

    I hope this information will help.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Sander
    Sander avatar
    2 posts
    Member since:
    Jan 2013

    Posted 10 Apr 2013 Link to this post

    Hi Alexander,

    Thanks for the response!

    I managed to make my whole mobile application to work with just kendo.all.min.js.  I could not use the custom download tool because I only have a trial license.

    Changing the to kendo.all.min.js has some strange behaviour though.  It appeared that my bindings didn't worked anymore.  After a long search I found the remark that Kendo UI Mobile is not included in the default list of initialized namespaces.  Now I found the section of MVVM integration in mobile applications

    I thought switching both JavaScripts would only affect the result and you did not have to change the code.  Now I see where I was wrong!

    Thanks again!
Back to Top