开发者

GWT CellTable OnClick Issue

I am new to GWT Development. In Celltable when i have selected on record, it will display a pop-up window. and then i will select OK/CANCEL button. it will close the pop-up window. if开发者_Python百科 i select the same record what i have selected before it is not showing the pop-up window.

Please any one can help me.


I assume your are doing something like this:

selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
  public void onSelectionChange(SelectionChangeEvent event) {
    //show popup here
  }
});

If that is what you are doing, then the behavior your are seeing is expected. SelectionChangeEvent will fire only when selection is changed. When you click on an already selected row, the selection remains same, hence no event is fired.

You should handle ClickEvent instead of SelectionChangeEvent. Frankly, I don't know if it is possible to handle click event for the whole row in a CellTable. If you don't really need the CellTable functions, you can simply use an HTMLTable subclass (FlexTable or Grid) which has simple method for handling click events.


(from the answer to Kun Xia’s linked question)

you might make use of CellPreviewEvent or override the SimpleSelectionModel – have a look at this thread for details.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜