PDA

View Full Version : [2.0a1][SOLVED] xhtml error !



Greko
3 Oct 2007, 5:59 AM
This time, i found a bug !



$ pwd
/cygdrive/c/opt/lib/ext-2.0-alpha1
$ grep -Rl "&#160[^;]" *
build/widgets/layout/BorderLayout-min.js
build/widgets/Panel-min.js
ext-all-debug.js
ext-all.js
source/widgets/layout/BorderLayout.js
source/widgets/Panel.js

We can see some ";" are missing.
That is the reason why i could not see my layout on Firefox 2.0.0.7

mystix
3 Oct 2007, 7:55 AM
pls provide details as per 13985

p.s. i have no idea what you're trying to say... missing semicolons are causing layout problems in FF2.0.0.7??? how?

Greko
4 Oct 2007, 12:43 AM
pls provide details as per 13985

Some details :

* ExtJS 2.0-alpha1
* Firefox 2.0.0.7
* Windows XP SP2
* Server Side : JBoss Seam (JSF + facelets) => xhtml rendering

test3.xhtml:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib">

<head>
<title>TEST XHTML</title>

<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />

<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script>

<script type="text/javascript" src="js/ext_template.js"></script>

<style type="text/css">
html, body {
font:normal 12px verdana;
margin:0;
padding:0;
border:0 none;
overflow:hidden;
height:100%;
}
p {
margin:5px;
}
</style>

<ui:insert name="head" />

<script type="text/javascript">
Ext.onReady(function(){
NFP.app.init();
});
</script>

</head>


<body>
<div id="west">
<p>Hi. I'm the west panel.</p>
</div>

<div id="north">
<h1>NFP</h1>
</div>

<div id="center">
<p>Hi. I'm the center panel.</p>
<ui:insert name="body"/>
</div>

<div id="south">
<p>Hi. I'm the south panel.</p>
</div>

</body>

</html>


ext_template.js:


Ext.namespace('NFP');

NFP.app = function() {

return {
// public methods
init: function() {

Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
var viewport = new Ext.Viewport({
layout:'border',
items:[
new Ext.BoxComponent({ // raw
region:'north',
el: 'north',
height:32
}),{
region:'south',
contentEl: 'south',
split:false,
height: 20,
minSize: 20,
maxSize: 20,
collapsible: true,
margins:'0 0 0 0'
},{
region:'west',
id:'west-panel',
title:'West',
split:true,
width: 200,
minSize: 175,
maxSize: 400,
collapsible: true,
margins:'0 0 0 5',
layout:'accordion',
layoutConfig:{
animate:true
},
items: [{
contentEl: 'west',
title:'Navigation',
border:false,
iconCls:'nav'
},{
title:'Settings',
html:'<p>Some settings in here.</p>',
border:false,
iconCls:'settings'
}]
},{
region:'center',
contentEl: 'center',
split:false,
collapsible: false,
title:'Center',
autoScroll:true,
margins:'0 0 0 0'
}
]
});
}
};
}();


Firefox error 1 (using standard error console)
[CODE]
Erreur : mal form

jack.slocum
4 Oct 2007, 12:57 AM
Thanks for the report. I have fixed the first missing semi-colon issue.

The second, you would use a renderer to htmlEncode the value.

Greko
4 Oct 2007, 1:11 AM
Thanks a lot!

pachama
15 Oct 2007, 12:30 AM
Hello,

I have the same problem as the one described in the second point. But i don't understand how to use the renderer to fix it. Someone can explain how to do that ?

thanks

jack.slocum
15 Oct 2007, 3:27 AM
On the grid column config, set renderer: 'htmlEncode' or renderer: Ext.util.Format.htmlEncode. For more renderer examples, most of the grid examples use them.