我需要实现“分页”我的应用程序的FlexTable部件:寻呼FlexTable与GWT
这是我在那里呈现一个产品成3列单元格初始代码:
public void renderProducts(Map<Long, Product> mp) {
int i = 0;
int j = 0;
Iterator it = mp.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pairs = (Map.Entry)it.next();
Product product = (Product) pairs.getValue();
ProductWidget pw = productInstance.get();
pw.setTitle(product.getName());
pw.setImageUrl(product.getImageUrl());
pw.setContent(product.getInfo());
pw.setUrl(product.getUrl()); // "More" button anchor
List<String> feats = product.getFeatures();
for (String f : feats){
pw.addFeature(f);
}
flextable.setWidget(i, j, pw);
j++;
if (j == 3){
i++;
j = 0;
}
it.remove(); // avoids a ConcurrentModificationException
}
}
极品为此在N个页面中进行分页。我最初的想法是将地图拆分为地图列表...
我的意思是,FlexTable中是否有任何“数据源”?
你有一个模型,需要分页,那么为什么不CellTable/DataGrid的?只是问问。 – 2013-03-19 12:36:22
我需要将一个小部件插入到可伸缩的“单元”中,请参阅:flextable.setWidget(...) 您有任何建议吗? – xybrek 2013-03-19 12:53:24