Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.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 CellTable上添加一个子程序_Gwt_Celltable - Fatal编程技术网

在GWT CellTable上添加一个子程序

在GWT CellTable上添加一个子程序,gwt,celltable,Gwt,Celltable,我有一个手机桌,需要一个不同类型的子程序;近似 我不想使用DataGrid,因为据我所知,DataGrid具有固定的高度,而我的表格使用动态高度看起来更好 我试图扩展CellTable,然后编写 public void renderRowValues(SafeHtmlBuilder sb, java.util.List<ShipmentLeg> values, int start, SelectionMo

我有一个手机桌,需要一个不同类型的子程序;近似

我不想使用DataGrid,因为据我所知,DataGrid具有固定的高度,而我的表格使用动态高度看起来更好

我试图扩展CellTable,然后编写

    public void renderRowValues(SafeHtmlBuilder sb,
            java.util.List<ShipmentLeg> values,
            int start,
            SelectionModel<? super ShipmentLeg> selectionModel){
        super.renderRowValues(sb, values, start, selectionModel);

        GWT.log("HELLO");
    }
public void renderRowValues(安全HTMLBuilder sb,
java.util.List值,
int start,

SelectionModelCellTable
DataGrid
之间的API是相同的。从GWT 2.5开始,
renderRowValues()
方法被弃用,因此,为了改变两个表的默认表结构(例如,创建子表),您需要提供一个
CellTableBuilder

两种表实现都使用
DefaultCellTableBuilder
(AbstractCellTableBuilder的扩展,它利用了大部分位,只公开了
buildRowImpl()
方法)。无论您使用的是
CellTable
还是
DataGrid
,这都是您想要的

扩展
AbstractCellTableBuilder
,并给出
buildRowImpl()
的实现,就像您链接的示例一样。请注意,您链接了一个旧示例。您应该始终在当前showcase中引用,因为API略有不同


旁注:
DataGrid
根本没有“固定高度”,但需要一个
providesize
容器,因为它需要在布局更改时动态调整大小(例如,在浏览器上调整大小)。如果您还没有查看。

CellTable和
DataGrid
之间的API是相同的。从GWT 2.5开始,
renderRowValues()
方法已被弃用,因此,为了更改两个表的默认表结构(例如,创建子视图),您需要提供
CellTableBuilder

两种表实现都使用
DefaultCellTableBuilder
(AbstractCellTableBuilder的扩展,它利用了大部分位,只公开了
buildRowImpl()
方法)。无论您使用的是
CellTable
还是
DataGrid
,这都是您想要的

扩展
AbstractCellTableBuilder
,并给出
buildRowImpl()
的实现,就像您链接的示例一样。请注意,您链接了一个旧示例。您应该始终在当前showcase中引用,因为API略有不同

旁注:
DataGrid
根本没有“固定高度”,但需要一个
providesize
容器,因为它需要在布局更改时动态调整其大小(例如,在浏览器调整大小时)。如果还没有,请签出