- dataModel = new ExtendedTableDataModel<Capital>(new DataProvider<Capital>() {
- private static final long serialVersionUID = 5054087821033164847L;
- public Capital getItemByKey(Object key) {
- for (Capital c : capitals) {
- if (key.equals(getKey(c))) {
- System.out.println("getItemByKey: " + key + "=" + c);
- return c;
- }
- }
- return null;
- }
- public List<Capital> getItemsByRange(int firstRow, int endRow) {
- return capitals.subList(firstRow, endRow);
- }
- public Object getKey(Capital item) {
- System.out.println("getKey: " + item.getName());
- return item.getName();
- }
- public int getRowCount() {
- return capitals.size();
- }
- });
Innereien
By: _eMaX_ | Date: Dec 10 2009 16:36 | Format: None | Expires: never | Size: 884 B | Hits: 894
Latest pastes
18 hours ago
1 days ago
1 days ago
1 days ago
2 days ago