- How do I modify the markup generated by a Wicket link in a PagingNavigator?
- <wicket:panel>
- <ul class="pagination">
- <li class="first">
- <a wicket:id="first"><<</a>
- </li>
- <li class="prev">
- <a wicket:id="prev"><</a>
- </li>
- <li wicket:id="navigation" class="page">
- <a wicket:id="pageLink" href="#">
- <span wicket:id="pageNumber">5</span>
- </a>
- </li>
- <li class="dots">...</li>
- <li wicket:id="lastPage" class="jump"></li>
- <li class="next">
- <a wicket:id="next">></a>
- </li>
- <li class="last">
- <a wicket:id="last">>></a>
- </li>
- </ul>
- <span title="Item Title" id="RandomID">
- <em>
- <span>ItemText</span>
- </em>
- </span>
- <a href="#" title=ItemTitle" id="RandomID" class="inactive">ItemText</a>
- <a href="#" title=ItemTitle" id="RandomID" class="currentPage">ItemText</a>
- import org.apache.wicket.markup.html.navigation.paging.IPageable;
- import org.apache.wicket.markup.html.navigation.paging.IPagingLabelProvider;
- import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;
- class MyPagingNavigator extends PagingNavigator {
- public MyPagingNavigator(String id, IPageable pageable) {
- super(id, pageable);
- }
- public MyPagingNavigator(String id, IPageable pageable, IPagingLabelProvider labelProvider) {
- super(id, pageable, labelProvider);
- }
- }
- <?xml version="1.0" encoding="UTF-8" ?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <html xmlns:wicket>
- <body>
- <wicket:panel>
- <a wicket:id="first"><<</a> <a wicket:id="prev"><</a>
- <span wicket:id="navigation">
- <a wicket:id="pageLink" href="#"><span wicket:id="pageNumber">5</span></a>
- </span>
- <a wicket:id="next">></a> <a wicket:id="last">>></a>
- </wicket:panel>
- </body>
- </html>