Your kendo mobile application element does not contain any direct child elements with data-role="view" attribute set. Make sure that you instantiate the mobile application using the correct container.

3 posts, 0 answers
  1. aremuga
    aremuga avatar
    4 posts
    Member since:
    Sep 2012

    Posted 20 Nov 2012 Link to this post

    In my mobile application, I got the above error when i replace Q2 into Q3
    Thanks in advance.
  2. Fotis Papppas
    Fotis Papppas avatar
    12 posts
    Member since:
    Oct 2004

    Posted 30 Nov 2012 Link to this post

    Hi aremuga,

    I had exactly the same problem when I was trying to initialize my kendo mobile application with a 'div' that didn't have a direct child div with data-role="view". Exactly as the error message says. Do you have any link that this error is reproducable?
    If you try to initialize with document.body mke sure that there is at least one div with data-role="view" inside the body tags and this div is direct child of body.

    <div data-role="view">
    <script type="text/javascript">
        var app = new;

  3. Andrew Paulson
    Andrew Paulson avatar
    11 posts
    Member since:
    Jul 2004

    Posted 14 Dec 2012 Link to this post

    when i had this problem when i upgraded, i noticed that the application thought it had  had no default layout, when I added a layout and had the view reference it the view showed up as expected.

    Here's the demo. this is what i mimic'd, you can multiple Layouts to allow you to switch between button bars and tabstrips depending on your need. 

    Use the data-layout attribute to specify which layout you want that view to use. when you use app.navigate("#myNextView"); you'll see it uses the layout you defined. 

    i'm not sure if a requirement changed or if it was just a hierarchial bug in my HTML layout but once i defined the layouts i had intended function. 
Back to Top