PDA

View Full Version : [2.0a1][CLOSED] CookieProvider breaks complex layout



treffer
4 Oct 2007, 3:27 AM
When using CookieProvider, the following code breaks with
m has no properties, ext-all-debug.js (line 14303)

Test file:
<html>
<head>

<title>BorderLayout/Accordion</title>
<link rel="stylesheet" type="text/css" href="res/ext/css/ext-all.css" />
<script type="text/javascript" src="res/js/ext-base.js"></script>
<script type="text/javascript" src="res/js/ext-all-debug.js"></script>
<script type="text/javascript">
Ext.onReady(function(){

Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

new Ext.Viewport({
layout:'border',
items: [
{
region: 'north',
height: 32
},{
region: 'west',
width: 300,
layout: 'accordion',
layoutConfig: {
animate: true
},
items: [
{
title: 'Pain1'
},
{
title: 'Pain2'
}
]
},
{
region:'center'
}
]
});

});
</script>

</head>

<body>
</body>

</html>
Firebug says that getMargin() returned "undefined", and the getSize() result looks weird, but I've no idea why or how this is related to the CookieProvider. Looks like a bug as it works with
//Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

Screenshot from Firebug
http://img63.imageshack.us/img63/5474/outrl5.th.png (http://img63.imageshack.us/my.php?image=outrl5.png)

Removed some flaws in the test case

jack.slocum
4 Oct 2007, 5:12 AM
region:'center' has an extra comma.

However, try removing the XHTML/XML stuff from the top as see if it works. It sounds like it could be related to another issue already fixed in SVN.

treffer
4 Oct 2007, 5:54 AM
the extra ',' as well as the XML stuff does not change anything at all, I changed the demo and it still breaks, hopefully this is fixed in the next alpha/svn. Sorry for the flaws in the test case.

One more thing: The problem only exists without a webserver. I just tried it via http:// and it worked. (uploaded @ http://home.in.tum.de/~treffer/exttest.html)

jack.slocum
4 Oct 2007, 6:04 AM
That is the problem. You can't use cookies without a webserver. :)