Results 1 to 4 of 4

Thread: Tree - more that one icon for leaf/folder cells

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Vote Rating

    Default Tree - more that one icon for leaf/folder cells

    Hello all!

    I was wondering how can one set more than one leaf/folder icon for the Tree widget in gxt v3? The only way I've found out is by overriding cells render method:
    SimpleSafeHtmlCell<String> cell = new SimpleSafeHtmlCell<String>(
            SimpleSafeHtmlRenderer.getInstance(), "") {
        public void render(Context context, String data, SafeHtmlBuilder sb) {
            if (data.equals("Beethoven")) {                    
            } else {
            super.render(context, data, sb);
    But somehow I doubt that's the best way. In Senchas gxt demo explorer you can see, that they are using more than one icon for leaves (open some UI Binder example and switch to source tab. You can see different icons for different file types in a file tree), but there are no examples on achieving this.

    p.s. This is definitively not the correct way to do this, because it does not behave like I suspected. Another way of doing it is to append the icon to SafeHtmlBuilder in render method, but still, not sure that's the way it should be.
    Last edited by raivis; 25 Nov 2011 at 1:36 AM. Reason: src code is not doing what I suspected it would

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts