01: /*
02: * $Id: PagedTablePage.java 458620 2006-01-14 00:54:30Z ivaynberg $
03: * $Revision: 458620 $
04: * $Date: 2006-01-14 01:54:30 +0100 (Sat, 14 Jan 2006) $
05: *
06: * ====================================================================
07: * Licensed under the Apache License, Version 2.0 (the "License");
08: * you may not use this file except in compliance with the License.
09: * You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19: package wicket.markup.html.list;
20:
21: import java.util.ArrayList;
22: import java.util.List;
23:
24: import wicket.markup.html.WebPage;
25: import wicket.markup.html.basic.Label;
26: import wicket.markup.html.navigation.paging.PagingNavigation;
27:
28: /**
29: * Dummy page used for resource testing.
30: */
31: public class PagedTablePage extends WebPage {
32: private static final long serialVersionUID = 1L;
33:
34: /**
35: * Construct.
36: * page parameters.
37: */
38: public PagedTablePage() {
39: super ();
40: List list = new ArrayList();
41: list.add("one");
42: list.add("two");
43: list.add("three");
44: PageableListView table = new PageableListView("table", list, 2) {
45: private static final long serialVersionUID = 1L;
46:
47: protected void populateItem(ListItem listItem) {
48: String txt = (String) listItem.getModelObject();
49: listItem.add(new Label("txt", txt));
50: }
51: };
52:
53: add(table);
54: PagingNavigation navigation = new PagingNavigation(
55: "navigation", table);
56: add(navigation);
57: }
58: }
|