Author: nbelaevski
Date: 2009-03-31 15:57:49 -0400 (Tue, 31 Mar 2009)
New Revision: 13328
Modified:
trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
Log:
https://jira.jboss.org/jira/browse/RF-6552
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2009-03-31
19:57:15 UTC (rev 13327)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2009-03-31
19:57:49 UTC (rev 13328)
@@ -83,12 +83,12 @@
String id = treeNode.getClientId(context);
StringBuilder script = new StringBuilder();
- script.append("Tree.Item.");
+ script.append("var c = Tree.Item.findComponent(this); if (!c) return; c.");
boolean expanded = tree.isExpanded();
if (expanded) {
- script.append("fireCollapsionEvent(this);");
+ script.append("fireCollapsionEvent();");
} else {
- script.append("fireExpansionEvent(this);");
+ script.append("fireExpansionEvent();");
}
if (UITree.SWITCH_AJAX.equals(tree.getSwitchType())) {
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 2009-03-31
19:57:15 UTC (rev 13327)
+++
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2009-03-31
19:57:49 UTC (rev 13328)
@@ -14,6 +14,7 @@
return component;
};
+/* do not use plz - left for back compatibility only */
Tree.Item.fireCollapsionEvent = function(elt) {
return Tree.Item.findComponent(elt).fireCollapsionEvent();
};
@@ -21,6 +22,7 @@
Tree.Item.fireExpansionEvent = function(elt) {
return Tree.Item.findComponent(elt).fireExpansionEvent();
};
+/* do not use end */
Tree.Item.createItemForNode = function() {
var getComponentIndex = function(node) {