【问题标题】:mgwt attach CellSelectedHandler to GroupingCellList inside HeaderListmgwt 将 CellSelectedHandler 附加到 HeaderList 内的 GroupingCellList
【发布时间】:2013-05-09 20:00:06
【问题描述】:

我无法将 SelectionHandler 附加到 mgwt HeaderList 的内容。 如何像在 Showcase 中一样将 CellSelectedHandler 附加到 HeaderList? http://mobilegwt.appspot.com/showcase/#GroupedCellListPlace:

我已经尝试将 Handler 附加到 GrouingCellList 与 HeaderList 的构建,但是这个 Handler 永远不会被触发。

有人已经这样做了吗?

【问题讨论】:

  • 我已经完成了 CellList 及其处理程序。它对你有用吗?
  • 使用 CellList 我也成功了,但是使用 HeaderList 中的 GroupingCellList 似乎不能那样工作。

标签: gwt mgwt celllist


【解决方案1】:

我设法使用 SelectionHandler 而不是 GroupingCellList 上的 CellSelectedHandler 来获取 SelectEvents

        addHandlerRegistration(view.getList().addSelectionHandler(new SelectionHandler<Content>(){
        @Override
         public void onSelection(SelectionEvent<Content> event) {
                Window.alert("event"+event.getSelectedItem().getName());
        }
    }));

【讨论】:

    猜你喜欢
    • 2014-10-28
    • 2016-08-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-10
    • 2015-07-15
    相关资源
    最近更新 更多