01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.wicket.ajax.markup.html.navigation.paging;
18:
19: import org.apache.wicket.markup.html.navigation.paging.IPageable;
20: import org.apache.wicket.markup.html.navigation.paging.IPagingLabelProvider;
21: import org.apache.wicket.markup.html.navigation.paging.PagingNavigationLink;
22:
23: /**
24: * An ajaxified navigation for a PageableListView that holds links to other
25: * pages of the PageableListView.
26: * <p>
27: * Please
28: *
29: * @see org.apache.wicket.markup.html.navigation.paging.PagingNavigation
30: *
31: * @since 1.2
32: *
33: * @author Martijn Dashorst
34: */
35: public class AjaxPagingNavigation
36: extends
37: org.apache.wicket.markup.html.navigation.paging.PagingNavigation {
38: private static final long serialVersionUID = 1L;
39:
40: /**
41: * Constructor.
42: *
43: * @param id
44: * See Component
45: * @param pageable
46: * The underlying pageable component to navigate
47: */
48: public AjaxPagingNavigation(final String id,
49: final IPageable pageable) {
50: this (id, pageable, null);
51: }
52:
53: /**
54: * Constructor.
55: *
56: * @param id
57: * See Component
58: * @param pageable
59: * The underlying pageable component to navigate
60: * @param labelProvider
61: * The label provider for the text that the links should be
62: * displaying.
63: */
64: public AjaxPagingNavigation(final String id,
65: final IPageable pageable,
66: final IPagingLabelProvider labelProvider) {
67: super (id, pageable, labelProvider);
68: }
69:
70: /**
71: * Factory method for creating ajaxian page number links.
72: *
73: * @param id
74: * link id
75: * @param pageable
76: * the pageable
77: * @param pageIndex
78: * the index the link points to
79: * @return the ajaxified page number link.
80: */
81: protected PagingNavigationLink newPagingNavigationLink(String id,
82: IPageable pageable, int pageIndex) {
83: return new AjaxPagingNavigationLink(id, pageable, pageIndex);
84: }
85: }
|