问问题
1345 次
1 回答
2
Not really. But you can reduce the code passing the list of entries:
DataView<Entry<String, String>> dataView = new DataView<~>("displayPanel", new ListDataProvider(new ArrayList<Entry<String, String>(map.entrySet())) {
@Override
protected void populateItem(Item item) {
Entry<String, String> entry = item.getModelObject();
item.add(new Label("key_column", entry.getKey()));
item.add(new Label("value_column", entry.getValue()));
}
});
于 2013-06-10T19:52:09.120 回答