[Users] Error after Drag & Drop in LayerTree
Andreas Hocevar
ahocevar at opengeo.org
Wed Aug 4 16:35:39 CEST 2010
Hi,
the issue you are describing sounds familiar. I cannot recall the ticket number, but I'm 99% that it has been fixed after the 0.7 release. So you could try trunk instead of 0.7.
Regards,
Andreas.
On Aug 4, 2010, at 16:32 , Sascha Müller wrote:
>
>
> 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
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list