将不胜感激的任何想法。表和分页
要求
(A)含表
A.1 text columns
A.2 one column for HTML content
A.3 one column to house a radio button group
(B)通过所述记录的能力,以页,例如通过使用SimplePager。
替代迄今认为
- FlexTable - 可以提供所有的(A),但不(B)
- CellTable - 可以提供A.1和(B),但不甲.2也没有A.3
任何人都可以提供一个替代品提供所有的A和B吗?我也看过Smart GWT,但没有看到我可以使用的任何东西。但是我对GWT或Smart GWT都不是很有经验。
谢谢。
[编辑1]现在创建如下三个按钮单选按钮组(“InterimReport”是我的数据类型):
Column<InterimReport, SafeHtml> radioButtonColumn = new Column<InterimReport, SafeHtml>(new SafeHtmlCell()) {
@Override
public SafeHtml getValue(InterimReport object) {
String s = "<input type=\"radio\" name=\"selection\"" + object.get("dbIndex") + " value=\"match\" /> match<br />"+ "<input type=\"radio\" name=\"selection\"" + object.get("dbIndex")+ " value=\"nomatch\" /> no match<br />" + "<input type=\"radio\" name=\"selection\""+ object.get("dbIndex") + " value=\"urlnotfound\" /> URL not found</>";
return SafeHtmlUtils.fromTrustedString(s);
}
};
[编辑2]但是,如何捕获用户的选择一个单选按钮?这段代码似乎并不做任何事情:
radioButtonColumn.setFieldUpdater(new FieldUpdater<InterimReport, SafeHtml>() {
public void update(int index, InterimReport object, SafeHtml value) {
System.out.println("Reached here");
if (value.equals("match")) {
setMatch(object.get("dbIndex"), index);
} else if (value.equals("nomatch")) {
setNoMatch(object.get("dbIndex"), index);
} else if (value.equals("urlnotfound")) {
setUrlNotFound(object.get("dbIndex"), index);
}
}
});
为什么这么说CellTable不能提供A.2和A.3? – 2011-04-07 16:32:56