开发者

Retrieve Cell in another Column in a CellTable

I have two Columns in a CellTable:

Column A contains a custom RadioButtonGroupCell, which extends AbstractInputCell. The group contains three radio buttons.

Column B contains a ButtonCell, and a click on the button is supposed to clear the selection made by the user in Column A.

My problem is I don't know how to retrieve a Cell in Column A from Column B. If I can retrieve the relevant Cell from Column A, I can work it out from there. Do the columns share a parent Element I can work with? I don't know the 'best practice' to follow and would be grateful for any tips.


Fixed as follows:

Element element = (Element) cellTable.getRowElement(rowIndex);
InputElement 开发者_JAVA技巧inputElement = (InputElement) element;
inputElement.setChecked(false);
cellTable.redraw();

Hmm, cellTable.redraw() deselects all radio buttons in all rows. Needs more work .....


You can get the current selected row (object by using following line)

cellTable.getDisplayedItems().get(index)

Once you get the object, set its value cellTable.getDisplayedItems().get(index).SET...

Once value is Set , redraw the table

cellTable.redraw();

Hope this helps....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜