Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在单元格表GWT中将小部件添加为单元格_Gwt_Pagination_Gwt Celltable - Fatal编程技术网

如何在单元格表GWT中将小部件添加为单元格

如何在单元格表GWT中将小部件添加为单元格,gwt,pagination,gwt-celltable,Gwt,Pagination,Gwt Celltable,现在我陷入了GWT中小部件的分页问题 我使用Cell table来显示我的UI活页夹类的实例列表(例如:LocationView)。 这是CellTable的展示 现在我想将我的小部件(UI活页夹类)添加到表的每个单元格中。它看起来会像这样 在此单元格表中,每个单元格都是此小部件(LocationView-一个UI活页夹类): 那么,如何使用单元格表创建此表(我不使用网格视图,因为它不支持分页) 或者,如果我不能使用Cell table创建此表,我可以使用什么来创建支持分页的表(如果Loca

现在我陷入了GWT中小部件的分页问题

我使用Cell table来显示我的UI活页夹类的实例列表(例如:LocationView)。 这是CellTable的展示

现在我想将我的小部件(UI活页夹类)添加到表的每个单元格中。它看起来会像这样

在此单元格表中,每个单元格都是此小部件(LocationView-一个UI活页夹类):

那么,如何使用单元格表创建此表(我不使用网格视图,因为它不支持分页)

或者,如果我不能使用Cell table创建此表,我可以使用什么来创建支持分页的表(如果LocationView(您看到的图标)的数量超过6,它将跳转到第2页)


谢谢你的帮助

教程解释了如何执行此操作。

要向单元格添加小部件,我使用自定义CellTableBuilder,并为应包含小部件的单元格设置唯一id。 然后我将小部件附加到DOM并将其移动到单元格中

void addWidgetToCell(final String cellId, final Widget widget) {
    Scheduler.get().scheduleDeferred(new ScheduledCommand() {
        @Override
        public void execute() {
            Element cellElem = DOM.getElementById(cellId);

            if (!widget.isAttached()) {
                // attach the detail to DOM (cannot attach it directly to the cell, because it has existing parent widget)
                RootPanel.get().add(widget);
            }
            // move detail element under the cell element
            cellElem.appendChild(widget.getElement());
        }
    });
}

你能解释一下scheduleDeferred调用的用法吗?