Results 1 to 5 of 5

Thread: "Getting started guide" does not work with xhtml document

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    4

    Default "Getting started guide" does not work with xhtml document

    I just would like to try the "getting started guide", so I've already downloaded the latest 4.0.7 extjs, and I am following the document "docs/index.html#!/guide/getting_started" under the extjs sdk.
    I wrote an html file as the guide says, wrote the app.js, copied everything under the web server application directory, but I named the file "index.xhtml" instead of "index.html".

    I tried it with Chrome 17.0 and IE 9, and they both give this error:

    "Uncaught Ext.Error: Cannot init QuickTipManager: no document body"
    ext-debug.js, Riga 8460 character 17

    The file index.xhtml is:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Hello, using ext!</title>
    <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"/>
    <script type="text/javascript" src="extjs/ext-debug.js"></script>
    <script type="text/javascript" src="app.js"></script>
    </head>
    <body><p>Questo &egrave; il body</p></body>
    </html>

    The app.js file is:

    Ext.application({
    name: 'HelloExt',
    launch: function() {
    Ext.create('Ext.container.Viewport', {
    layout: 'fit',
    items: [
    {
    title: 'Hello Ext',
    html : 'Hello! Welcome to Ext JS.'
    }
    ]
    });
    }
    });

    If I rename the file "index.html" or "index.jsp" everything works, and the first example shows...
    What am I missing?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449

    Default

    Why are you trying to use xhtml?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    4

    Default

    I just use xhtml, when programming with jee 6 .
    Shouldn't I use xhtml? Why?

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Posts
    4

    Default

    Ext version tested:
    • Ext 4.0.7

    Browser versions tested against:
    • Chrome 17 (Windows)
    • IE9 (...Windows)

    Description:
    • When I follow the "Getting started guide" and create an "hello world" app with ExtJS it fails when the index file is index.xhtml (.xhtml, not .html).

    Steps to reproduce the problem:
    • Just follow the "Getting started guide" but name the index file "index.xhtml"

    The result that was expected:
    • You should see the message ExtJS is ok and welcomes you

    The result that occurs instead:
    • Nothing happens int the browser and in the console of Chrome or IE you can read: "Uncaught Ext.Error: Cannot init QuickTipManager: no document body", ext-debug.js, Row 8460 character 17

    Test Case:

    Just start a new web application as the guide says, copy the sdk in the right position, but call the file "index.xhtml".

    The file index.xhtml is:



    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Hello, using ext!</title>
    <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"/>
    <script type="text/javascript" src="extjs/ext-debug.js"></script>
    <script type="text/javascript" src="app.js"></script>
    </head>
    <body><p>Questo &egrave; il body</p></body>
    </html>

    the app.js file is:

    Ext.application({
    name: 'HelloExt',
    launch: function() {
    Ext.create('Ext.container.Viewport', {
    layout: 'fit',
    items: [
    {
    title: 'Hello Ext',
    html : 'Hello! Welcome to Ext JS.'
    }
    ]
    });
    }
    });

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Posts
    492

    Default

    Quote Originally Posted by oncethor View Post
    Ext version tested:
    • Ext 4.0.7
    Browser versions tested against:
    • Chrome 17 (Windows)
    • IE9 (...Windows)
    Description:
    • When I follow the "Getting started guide" and create an "hello world" app with ExtJS it fails when the index file is index.xhtml (.xhtml, not .html).
    Steps to reproduce the problem:
    • Just follow the "Getting started guide" but name the index file "index.xhtml"
    The result that was expected:
    • You should see the message ExtJS is ok and welcomes you
    The result that occurs instead:
    • Nothing happens int the browser and in the console of Chrome or IE you can read: "Uncaught Ext.Error: Cannot init QuickTipManager: no document body", ext-debug.js, Row 8460 character 17
    Test Case:

    Just start a new web application as the guide says, copy the sdk in the right position, but call the file "index.xhtml".

    The file index.xhtml is:



    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Hello, using ext!</title>
    <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"/>
    <script type="text/javascript" src="extjs/ext-debug.js"></script>
    <script type="text/javascript" src="app.js"></script>
    </head>
    <body><p>Questo &egrave; il body</p></body>
    </html>

    the app.js file is:

    Ext.application({
    name: 'HelloExt',
    launch: function() {
    Ext.create('Ext.container.Viewport', {
    layout: 'fit',
    items: [
    {
    title: 'Hello Ext',
    html : 'Hello! Welcome to Ext JS.'
    }
    ]
    });
    }
    });
    +1. Happens in 4.1 RC 1 and 2 as well.

    The problem seems to be at line 141891 @ ext-all-dev.js:

    Code:
    if (tipConfig.renderTo.tagName != 'BODY')
    Please see http://www.sencha.com/forum/showthre...147#post774147 for more information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •