ListView not binding in Android WebView

2 posts, 0 answers
  1. Gary Bailey
    Gary Bailey avatar
    1 posts
    Member since:
    Feb 2009

    Posted 23 Jun 2012 Link to this post

    I am attempting to write an app via Titanium and implementing the Kendo UI. It took me a few days to find the right combination of JavaScript libraries, but I finally got it working. I've now moved onto attempting to get data (into a ListView to start). The following code snippets do work on iOS with the same setup, so it may have something to do with Android's, but I would appreciate any pointers to something I may be missing:

    The HTML file looks like:

            <!-- Style sheets -->
            <link href="../css/" rel="stylesheet"/>
            <!-- Javascript libraries -->
            <script src="../js/jquery-1.7.1.js" type="text/javascript"></script>
            <script src="../kendo/kendo.all.min.js" type="text/javascript"></script>
    <div data-role="view" id="content-options" data-title="Data View 1">
        <header data-role="header">
            <div data-role="navbar">
                <span data-role="view-title">Header</span>
        <div id="header-info">
            <img src="../images/img-142.jpg" alt="img" />
            <div class="version">Some text</div>
            <div class="release-date">XX/XX/XXXX</div>
        <ul data-role="listview" id="package-list" data-style="inset">
         var app = new, {layout: "default"});

    The JSON Array of data is received in a call back from the Titanium framework to the HTML page where it hands off data from the database.

        Ti.App.addEventListener('packageDataResponse',function(responseData) {
            var dataSource = new{
                    data: responseData.message
                    template: "${title}",
                    dataSource: dataSource

    And finally, here's some sample data that comes back to the HTML 5 after the JavaScript call:

    responseData.message = [
        { packageid: "1", title: "Package 1", description: "Description for Package 1" },
        { packageid: "2", title: "Package 2", description: "Description for Package 2" },
        { packageid: "3", title: "Package 3", description: "Description for Package 3" },
        { packageid: "4", title: "Package 4", description: "Description for Package 4" }

    As I said, this all seems to come through just fine when I load it up on iOS, but in the Android WebView, I get the following JavaScript:

    Uncaught ReferenceError: title is not defined (2:file:///android_asset/Resources/HTML/en/index.html)

    It seems like it can't locate the title attribute of the JSON array, but I don't see any reason why it wouldn't. Has anyone else run into this? Any suggestions from the Kendo folks?


  2. Alexander Valchev
    Alexander Valchev avatar
    2873 posts

    Posted 28 Jun 2012 Link to this post

    Hi Gary,

    I am afraid that the provided information is not sufficient enough to determine where the problem comes from. The issue might be connected with the Titanium framework, so I would like to recommend opening a support ticket with small but runnable Titatium sample project attached. Thus way we would be able to see and reproduce the problem on our side, examine your case in details and do our best to advise you further.

    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!
Back to Top