[Users] Error after Drag & Drop in LayerTree
Sascha Müller
s.mueller76 at arcor.de
Wed Aug 4 16:32:41 CEST 2010
Hi list,
I use:
GeoExt: 0.7
OpenLayers: 2.9
ExtJs: 3.2.1
GeoServer: 1.7.7
I Change the position of a layer in the tree. Afterwards I want to check
the checkbox of the layer.
Then appears an error: "this.items.get(...).text' is null or no Object".
In LayerLegend.js
update: function() {
var title = this.getLayerTitle(this.layerRecord);
=> if (this.items.get(0).text !== title) { // this is the
row where the error comes from.
// we need to update the title
this.items.get(0).text = title;
}
},
If I try to check a checkbox at a layer without Drag & Drop before, it
works.
If I remove the Legend from the application, it works. I don't know, why the
item (the layer on the new position in the tree) no properties 'text'
contains.
Maybe I miss something with the new legend in GeoExt 0.7.
My code looks like this:
treePanel
========
var treePanel = new Ext.tree.TreePanel({
id: 'lt',
title: 'Layer',
region: 'west',
loader: new Ext.tree.TreeLoader({
applyLoader: false
}),
root: {
nodeType: "async",
children: Ext.decode(treeConfig)
},
rootVisible: false,
lines: false,
enableDD: true,
split: true,
autoScroll: true,
collapsible: true,
bodyStyle: 'padding:5px;',
width: 200,
minSize: 200
});
legendPanel
==========
var legendPanel = new GeoExt.LegendPanel({
title : "Legende",
autoScroll : true,
dynamic : true,
showTitle : true,
defaults : {
labelCls : 'legendLabel',
style : 'padding:5px',
imageFormat : 'image/gif',
useScaleParameter : false
},
bodyStyle : "padding: 1px;",
filter : function(record) {
return !record.get("layer").isBaseLayer;
}
});
If I use Firefox, everything is ok.The error appears, but only in the
console. With the IE8, there comes a Window with the error.
Thanks
Sascha
More information about the Users
mailing list