PDA

View Full Version : [INFOREQ] "Getting started guide" does not work with xhtml document



oncethor
22 Nov 2011, 1:07 PM
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?

mitchellsimoens
22 Nov 2011, 1:50 PM
Why are you trying to use xhtml?

oncethor
22 Nov 2011, 1:58 PM
I just use xhtml, when programming with jee 6 .
Shouldn't I use xhtml? Why?

oncethor
23 Nov 2011, 4:05 AM
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.'
}
]
});
}
});

abcdef
6 Apr 2012, 12:16 PM
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:



if (tipConfig.renderTo.tagName != 'BODY')


Please see http://www.sencha.com/forum/showthread.php?193220-ExtJS-4.1-RC2-enableQuickTips-configuration-in-Ext.application-not-working&p=774147#post774147 for more information.