Extend PagingNavigator.  I made a custom one so I can use everywhere:

It looks something like this

First Prev 1 2 3 4 Next Last


The active page will be in Red and italics.
You can make it anything you want by changing the HTML and/or CSS. Hope it
works for you.

Java - CustomPagingNavigator.java

import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;
import org.apache.wicket.markup.html.navigation.paging.IPageable;
import org.apache.wicket.markup.html.navigation.paging.IPagingLabelProvider;



public class CustomPagingNavigator extends PagingNavigator{

        private static final long serialVersionUID = 1L; 
        
        
        // First PagingNavigator constructor
        public CustomPagingNavigator (String id, IPageable pageable) {
                super(id, pageable);
        }
        
        
        
        // Second PagingNavigator constructor
        public CustomPagingNavigator (String id, IPageable pageable,
IPagingLabelProvider labelProvider) {
                super(id, pageable, labelProvider);
        }
        
}

HTML - CustomPagingNavigator.html

<!-- This is a customization of the wicket component PagingNavigator.html 
        It changes the following defaults
        "<<" is now "First"
        ">>" is now "Last"
        "<" is now "Prev"
        ">" is now "Next"
        
        You will also need to copy CustomPagingNavigator.css to the root of your
web app
        and @include it in your main style sheet.  See .css file
        
-->

<html xmlns:wicket>
        <body>
                <wicket:panel>
                         First   Prev 
                         # 1  
                         Next   Last 
                </wicket:panel>
        </body>
</html>

CSS - CustomPagingNavigator.css

/* Copy this file to the root of the web app
/* Use the following in the main style sheet to import these specs    */
/* @import url(CustomPagingNavigator.css);                */

/* Data Navigator    */
.navigator {color:red}
.navigator a:link, a:visited, a:active {color:blue;text-decoration:none;}
-- 
View this message in context: 
http://www.nabble.com/How-to-change-the-style-of-navigator-in-PageableViewList-tp14978321p15000001.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to