gwt celltree changing image when the node is open/closed -
i have drawn tree celltree using gwt 2.5, , when opening node want alter image before text in cell. tried imageresource don't worked because don't want alter icon, image in cell container, possible in celltree?
example in same node when open , closed: + [image] - [new image] a
public void render(cell.context context, treenode value, safehtmlbuilder sb) { if (value instanceof treenode) { sb.appendhtmlconstant("<div><img src ='/bound.png' width=16 height=16><span class=\"treeelements\">"); sb.appendhtmlconstant(value.getname() + "</span></div>"); }
any help welcome!
there 2 ways solve it:
check in render method if node open (checkcelltreenodeview
class how it) , conditionally render corresponding image. use celltreeopenitem()
obfuscated classname (it set on cell when open it) , css selectors alter image (but utilize background image instead of img element). image gwt
No comments:
Post a Comment