You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by sap2000 <sa...@indiatimes.com> on 2011/04/27 11:31:21 UTC

Customized AjaxPagingNavigator to highlight selected page number

The current page selection is noticed by disabled link of the selected page
number.
In our project we need to highlight (bold font and colour) selected page by
means of css.
How this can be achived ?

Thank you.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Customized-AjaxPagingNavigator-to-highlight-selected-page-number-tp3477625p3477625.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized AjaxPagingNavigator to highlight selected page number

Posted by sap2000 <sa...@indiatimes.com>.
Thanks Clint.

To start with, I chose the second option from your suggestion, spent lot of
time to no avail.
Then I gave try to second option (i.e. css) and within no time got the
solution.

In css, added a class for navigator as 

.navigator_Class{} // no change - kept original style as it is

.navigator_Class span span em span{font-weight:bold;color: blue;} //
applicable to selected page number only

It is important to know tag hierarchy. 
If only <em> tag is considered then all disabled link gets affected(which
can include '<' and '<<' etc.) 
Firebug helped here to find tag hierarchy for current select page number.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Customized-AjaxPagingNavigator-to-highlight-selected-page-number-tp3477625p3494597.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized AjaxPagingNavigator to highlight selected page number

Posted by Clint Checketts <ch...@gmail.com>.
If you navigator has a unique class (or id) you could just refer to it via the CSS:

I'm guessing something like .goto em{font-weight: bold; font-color: blue} would work. Note that disabled links by default are wrapped in <em> tags.

If that isn't good enough, you can subclass the AjaxPagingNavigator and override the newPagingNavigationLink() method. In there you could add a behavior to do your custom styling or set the setBeforeDisabledLink() and setAfterDisabledLink() methods to insert in the markup you require.

-Clint 
-- 
Clint Checketts
Sent with Sparrow
On Wednesday, April 27, 2011 at 4:31 AM, sap2000 wrote: 
> The current page selection is noticed by disabled link of the selected page
> number.
> In our project we need to highlight (bold font and colour) selected page by
> means of css.
> How this can be achived ?
> 
> Thank you.
> 
> 
> 
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Customized-AjaxPagingNavigator-to-highlight-selected-page-number-tp3477625p3477625.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>