Adding a gwt celltree as a celltable column

208 views
Skip to first unread message

manu

unread,
Apr 19, 2012, 4:54:20 AM4/19/12
to Google Web Toolkit
Hi All,

I have a requirement to add a gwt celltree inside of a celltable
column.I was successful in adding the celltree inside the celltable
column by creating a custom cell. But the problem I am facing is that
the celltree is not recognizing events once it is inside the
celltable.When I click on the expand or collapse icons of
the celltree it is not responding. Can you please help me?

Please find below the code for my custom cell which renders the cell
tree inside of my cell table:

public class TreeCellRenderer extends AbstractCell<CellTree> {
@Override
public void render(com.google.gwt.cell.client.Cell.Context
context,
CellTree value, SafeHtmlBuilder sb) {


sb.append(SafeHtmlUtils.fromTrustedString(value.getElement().getInnerHTML()));
}
}


//To add the cell tree inside celltable column
Column<XYZ, CellTree> column = new Column<XYZ, CellTree>(new
TreeCellRenderer ()) {
@Override
public CellTree getValue(XYZ object) {
CellTree tree = new
CellTree(model,null, res);
return cellTree;
}
};
}
celltable.addColumn(column);

Please let me know whether this is correct and what code should I need
to add to make the cell tree respond to expand/collapse events inside
the celltable.

Appreciate your help in this.

Thanks in advance,

Bhumika Thaker

unread,
May 31, 2012, 5:44:38 AM5/31/12
to google-we...@googlegroups.com
Hello ,

Have U achive this feature because I want to try the same but I didn't...

Thanks,
Bhumi
Reply all
Reply to author
Forward
0 new messages