Author: nbelaevski
Date: 2007-10-25 14:49:09 -0400 (Thu, 25 Oct 2007)
New Revision: 3550
Modified:
trunk/ui/tree/src/main/config/component/tree.xml
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
Log:
http://jira.jboss.com/jira/browse/RF-1160 fixed
"value" attribute type fixed
Modified: trunk/ui/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/ui/tree/src/main/config/component/tree.xml 2007-10-25 18:38:59 UTC (rev 3549)
+++ trunk/ui/tree/src/main/config/component/tree.xml 2007-10-25 18:49:09 UTC (rev 3550)
@@ -115,7 +115,7 @@
</property>
<property>
<name>value</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Object</classname>
<description>The current value for this component</description>
</property>
<property>
Modified:
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
===================================================================
---
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-10-25
18:38:59 UTC (rev 3549)
+++
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-10-25
18:49:09 UTC (rev 3550)
@@ -32,10 +32,6 @@
this.eventMouseOut = this.processMouseOut.bindAsEventListener(this);
this.eventMouseOver = this.processMouseOver.bindAsEventListener(this);
- if (this.onContextMenu) {
- this.eventRightClick = this.onContextMenu.bindAsEventListener();
- }
-
this.observeEvents(element);
},
@@ -63,12 +59,20 @@
eIcon = cells[this.elementID.icon];
eText = cells[this.elementID.text];
}
+
if (eIcon) {
+ var contextMenu = Richfaces.getNSAttribute("oncontextmenu", eIcon);
+ if (contextMenu && contextMenu.length > 0) {
+ this.onContextMenu = new Function("event", contextMenu + "; return
true;").bindAsEventListener(this);
+ }
+ }
+
+ if (eIcon) {
Event.observe(eIcon, "mousedown", this.eventSelectionClick);
Event.observe(eIcon, "mouseout", this.eventMouseOut);
Event.observe(eIcon, "mouseover", this.eventMouseOver);
- if (this.eventRightClick) {
- eIcon.oncontextmenu = this.eventRightClick;
+ if (this.onContextMenu) {
+ eIcon.oncontextmenu = this.onContextMenu;
}
}
if (eText)
@@ -76,8 +80,8 @@
Event.observe(eText, "mousedown", this.eventSelectionClick);
Event.observe(eText, "mouseout", this.eventMouseOut);
Event.observe(eText, "mouseover", this.eventMouseOver);
- if (this.eventRightClick) {
- eText.oncontextmenu = this.eventRightClick;
+ if (this.onContextMenu) {
+ eText.oncontextmenu = this.onContextMenu;
}
}
@@ -92,11 +96,6 @@
getElements: function(element, ajaxUpdate) {
this.childs = [];
- /*var contextMenu = Richfaces.getNSAttribute("oncontextmenu",
$(this.elementID.icon));
- if (contextMenu && contextMenu.length > 0) {
- this.onContextMenu = new Function(contextMenu + "; return true;");
- }*/
-
var childsTd = element.nextSibling;//$(this.elementID.children);
if (ajaxUpdate && this.tree.showConnectingLines) {