After rendering a node in a tree, it is not possible to change its icon
under Firefox using setIconCls(String) method. The same code works fine
under IE. The method changes the value of 'classname' attribute, but
Firefox likes more 'class' attribute instead :) Thus, a simple patch is
necessary:
Index:
C:/workspace/GWTExt/main/src/com/gwtext/client/widgets/tree/TreeNode.java
===================================================================
---
C:/workspace/GWTExt/main/src/com/gwtext/client/widgets/tree/TreeNode.java
(revision 1850)
+++
C:/workspace/GWTExt/main/src/com/gwtext/client/widgets/tree/TreeNode.java
(working copy)
@@ -559,6 +559,7 @@
Element el = getUI().getIconEl();
if (el != null) {
DOM.setElementAttribute(el, "className", "x-tree-node-icon
" + iconCls);
+ DOM.setElementAttribute(el, "class", "x-tree-node-icon " +
iconCls);
}
}
}
The patch has been tested with GWTExt 2.0.5 and Firefox 3.x
Original issue reported on code.google.com by pedjak@gmail.com on 4 Nov 2008 at 10:38
Original issue reported on code.google.com by
pedjak@gmail.com
on 4 Nov 2008 at 10:38