[Users] GeoExt.plugins.TreeNodeActions problem
Arnaud De Groof
Arnaud.DeGroof at spacebel.be
Fri Apr 1 11:25:28 CEST 2011
I received now the following error:
d is undefined
anonymous()ext-all.js (line 7)
anonymous(Object ptype=gx_treenodeactions listeners=Object)ext-all.js
(line 7)
anonymous(Object region=west width=250 title=Layer Tree
loader=Object)ext-all.js (line 7)
anonymous()ext-base.js (line 7)
anonymous()ext-base.js (line 7)
anonymous()ext-base.js (line 7)
anonymous()ext-base.js (line 7)
anonymous()cartosimple1.html (line 172)
anonymous()ext-all.js (line 7)
Ext.DomHelper=function(){var
w=null,k=/^...dblclick",this.onNodeDblClick,this)}});\n ext-all.js (line
7)
Arnaud
From: Bart van den Eijnden [mailto:bartvde at osgis.nl]
Sent: vendredi 1 avril 2011 10:52
To: Arnaud De Groof
Cc: users at geoext.org
Subject: Re: [Users] GeoExt.plugins.TreeNodeActions problem
And what if you add:
Ext.ns("GeoExt.examples");
in the beginning of the script?
Best regards,
Bart
--
Looking for flexible support on OpenLayers or GeoExt? Please check out
http://www.osgis.nl/support.html
Bart van den Eijnden
OSGIS
bartvde at osgis.nl
On Apr 1, 2011, at 10:48 AM, Arnaud De Groof wrote:
Hi,
I tried without success to use the sample code (example coming from the
GeoExt documentation at
http://dev.geoext.org/docs/lib/GeoExt/plugins/TreeNodeActions.html) to
create a layer node UI with an actions plugin. I use the GeoExt trunk.
I received the following error message from firebug:
GeoExt.examples is undefined
anonymous()
anonymous()
new GeoExt.tree.TreeNodeUIEventMixin()\r\n
Had anybody similar problems?
Thanks,
Arnaud
The sample code:
var uiClass = GeoExt.examples.LayerNodeUI = Ext.extend(
GeoExt.tree.LayerNodeUI,
new GeoExt.tree.TreeNodeUIEventMixin()
);
// this function takes action based on the "action"
// parameter, it is used as a listener to layer
// nodes' "action" events
function onAction(node, action, evt) {
var layer = node.layer;
switch(action) {
case "delete":
layer.destroy();
break;
}
};
var tree = new Ext.tree.TreePanel({
region: "west",
width: 250,
title: "Layer Tree",
loader: {
applyLoader: false,
uiProviders: {
"ui": GeoExt.examples.LayerNodeUI
}
},
// apply the tree node actions plugin to layer nodes
plugins: [{
ptype: "gx_treenodeactions",
listeners: {
action: onAction
}
}],
root: {
nodeType: "gx_layercontainer",
loader: {
baseAttrs: {
radioGroup: "radiogroup",
uiProvider: "ui",
actions: [{
action: "delete",
qtip: "delete"
}]
}
}
},
rootVisible: false
});
-
------------------------------------------------------------------------
-----
E-MAIL DISCLAIMER
The present message may contain confidential and/or legally privileged
information. If you are not the intended addressee and in case of a
transmission error, please notify the sender immediately and destroy
this E-mail. Disclosure, reproduction or distribution of this document
and its possible attachments is strictly forbidden.
SPACEBEL denies all liability for incomplete, improper, inaccurate,
intercepted, (partly) destroyed, lost and/or belated transmission of the
current information given that unencrypted electronic transmission
cannot currently be guaranteed to be secure or error free.
Upon request or in conformity with formal, contractual agreements, an
originally signed hard copy will be sent to you to confirm the
information contained in this E-mail.
SPACEBEL denies all liability where E-mail is used for private use.
SPACEBEL cannot be held responsible for possible viruses that might
corrupt this message and/or your computer system.
e
------------------------------------------------------------------------
------
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
- -----------------------------------------------------------------------------
E-MAIL DISCLAIMER
The present message may contain confidential and/or legally privileged information. If you are not the intended addressee and in case of a transmission error, please notify the sender immediately and destroy this E-mail. Disclosure, reproduction or distribution of this document and its possible attachments is strictly forbidden.
SPACEBEL denies all liability for incomplete, improper, inaccurate, intercepted, (partly) destroyed, lost and/or belated transmission of the current information given that unencrypted electronic transmission cannot currently be guaranteed to be secure or error free.
Upon request or in conformity with formal, contractual agreements, an originally signed hard copy will be sent to you to confirm the information contained in this E-mail.
SPACEBEL denies all liability where E-mail is used for private use.
SPACEBEL cannot be held responsible for possible viruses that might corrupt this message and/or your computer system.
e ------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110401/282d878e/attachment-0001.htm
More information about the Users
mailing list