Opened 15 years ago
Closed 15 years ago
#2369 closed defect (wontfix)
TreeContextMenu inside LinkPane breaks after calling refresh on the LinkPane
Reported by: | Owned by: | bill | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.4.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Build: dojo-0.4.1-ajax Browser: IE6 SP2 and FF 1.5.0.9 Error:
- In FF:
DEBUG: [TypeError: menu has no properties, file: file:///path/to/dojo/TreeContextMenu.js, line: 144] when calling menuOpen$joinpoint$method on [unknown] with arguments [object Object] FATAL exception raised: menu has no properties
- In IE6:
DEBUG: [TypeError: 'parent' is null or not an object] when calling menuOpen$joinpoint$method on [ActiveXObject] with arguments [object Object] FATAL exception raised: 'parent' is null or not an object
Reproduction: Create a LinkPane? with the href pointing to simple page with a Tree widget an associated TreeContextMenu?. Create a button that calls refresh on the LinkPane?. On first load the context menu works properly. Click the refresh button and you will see the error.
-- MAIN PAGE --
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <script type="text/javascript"> var djConfig = {isDebug: true, debugAtAllCosts: true }; </script> <script type="text/javascript" src="../../../dojo.js"></script> <script type="text/javascript"> dojo.require("dojo.lang.*"); dojo.require("dojo.widget.*"); dojo.require("dojo.widget.Tree"); dojo.require("dojo.widget.TreeContextMenu"); dojo.hostenv.writeIncludes(); </script> </head> <body> <div dojoType="LinkPane" widgetId="lpTest" href="test_Tree_11_1.html" executeScripts="true" cacheContent="false" refreshOnShow="true"> </div> <input type="button" value ="Reload Tree" onClick="dojo.widget.byId('lpTest').refresh();" /> </body> </html>
-- Tree Page --
<div dojoType="TreeContextMenu" toggle="explode" contextMenuForWindow="false" widgetId="treeContextMenu"> <div dojoType="TreeMenuItem" treeActions="test" widgetId="treeContextMenuCreate" caption="Test"></div> </div> <div dojoType="Tree" menu="treeContextMenu" widgetId="firstTree"> <div dojoType="TreeNode" title="Item 1"></div> </div>
Change History (2)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
TreeContextMenu? is no longer supported; you have to manually wire up a context menu.
I was able to resolve the issue by moving the TreeContextMenu? into the main page. Also changing the id of the TreeContextMenu? between refreshes fixes the issue. There seems to be an id conflict; like the menu is not being properly destroyed. I tried manually calling destory before the refresh but that did not work.