Refreshing Page - Error Make Virtual

3 posts, 0 answers
  1. Dan
    Dan avatar
    12 posts
    Member since:
    Feb 2016

    Posted 30 Mar 2016 Link to this post


    I am using Kendo Mobile UI with ASP.NET as a SPA (loading all of the css and js files at once).

    My issue is that I cannot refresh at an arbitrary page. 

    I am initializing my app in a global javascript file like this:

    app = new, {     skin: "nova",     pushState: true,     root: "/",         transition: "slide" });

    In java script of the reloading page I use:

    var initializeContacts = function() {
    contactsList = $("#contacts").kendoMobileListView({     
    dataSource: dataSource,     
    template: $("#contacts-template").text(),    
    filterable: {         field: "FullName",      
    operator: "contains"    
    loadMore: true }).data("kendoMobileListView");

    In HTML I use data-init="initializeContacts" on the view.
    This gives me cannot "makeVirtual" of null.

    After commenting out filterable and loadMore fields, the page loads without error but no items are displayed.

    Is this a known issue or am I doing something wrong?
    Thank you,

  2. Dan
    Dan avatar
    12 posts
    Member since:
    Feb 2016

    Posted 30 Mar 2016 Link to this post

    I looked further into this and I see that when I refresh a page, I have two views:
    one with data-url="/Contacts?contactId=123" and the other with data-url="/Contacts".

    Both of these views have the <ul id="contacts"></ul> which causes the initialization to fail.

    If I delete the "/Contacts?contactId=123" view from the html before the list is initialized, the page loads correctly. This is due to there being two lists with id of contacts.

    Is there any reason why kendo mobile would create two views?

    Thank you,

  3. Petyo
    Petyo avatar
    2442 posts

    Posted 05 Apr 2016 Link to this post


    this seems strange. In general, the mobile app navigation should not introduce two views with the urls you have pointed to. May you please isolate your problem? You may use plunkr for that purpose, it supports multiple files and will allow you to simulate the remote views which you most likely use. 

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top