Well.. I have a class that overrides AjaxPagingNavigation
I just add that to my page.
Class & markup below:
> public class BSPagingNavigator extends AjaxPagingNavigator {
>
> private static final long serialVersionUID = -1l;
>
> IPageable pageable;
>
> public BSPagingNavigator(String id, IPageable pageable,
> IPagingLabelProvider labelProvider) {
> super(id, pageable, labelProvider);
> this.pageable = pageable;
> setOutputMarkupPlaceholderTag(true);
> }
>
> public BSPagingNavigator(String id, IPageable pageable) {
> this(id, pageable, null);
> }
>
> protected PagingNavigation newNavigation(final IPageable pageable,
> final IPagingLabelProvider labelProvider) {
> return new PagingNavigation("navigation", pageable,
> labelProvider) {
> private static final long serialVersionUID = -1l;
>
> {
> setViewSize(6);
> // setMargin(0);
> setSeparator("|");
> }
>
> };
> }
>
> @Override
> protected void onBeforeRender() {
> super.onBeforeRender();
> setVisible(getPageable().getPageCount() > 1);
> boolean hideControls = pageable.getPageCount() < 10;
> boolean onLastPage = pageable.getPageCount() ==
> pageable.getCurrentPage();
> boolean onFirstPage = pageable.getCurrentPage() == 0;
> get("last").setVisible(!hideControls && !onLastPage);
> get("prev").setVisible(!hideControls);
> get("next").setVisible(!hideControls);
> get("first").setVisible(!hideControls && !onFirstPage);
>
> }
>
> }
markup
> <wicket:panel>
> <div class="font-xsmall">
> <span class="font-xsmall" wicket:id="first"><em><<</em></
> span>
> <a href="#" class="font-xsmall prev" wicket:id="prev">prev</a>
> <span class="font-xsmall" wicket:id="navigation">
> <a href="#" class="font-xsmall" wicket:id="pageLink"><span
> class="pagin-number" wicket:id="pageNumber">1</span></a>
> </span>
> <a href="#" class="font-xsmall next" wicket:id="next">next</
> a>
> <a href="#" class="font-xsmall" wicket:id="last">>></a>
> </div>
> </wicket:panel>
On Sep 30, 2009, at 2:07 PM, Pedro Santos wrote:
> Ok, it is a bug. Could you send us some code? I'm curios to see the
> html
> code generated to link on your page.
>
> On Wed, Sep 30, 2009 at 3:59 PM, Douglas Ferguson <
> [email protected]> wrote:
>
>> That's my point.
>>
>> If your url is getting replaced, then it isn't using ajax.
>> It is redrawing the page.
>>
>> D/
>>
>> On Sep 29, 2009, at 3:56 PM, Pedro Santos wrote:
>>
>>> I'm using the AjaxPagingNavigation component and it works well, but
>>> when I
>>> click on one of the links, my url is replaced with
>>>
>>> /?wicket:interface=:3:4:::
>>>
>>> You refers to html "A" tag generated by navigations links. What you
>>> got on
>>> onclick tag attribute on your rendered page?
>>>
>>> On Mon, Sep 28, 2009 at 9:57 PM, Douglas Ferguson <
>>> [email protected]> wrote:
>>>
>>>> I'm using the AjaxPagingNavigation component and it works well, but
>>>> when I
>>>> click on one of the links, my url is replaced with
>>>>
>>>> /?wicket:interface=:3:4:::
>>>>
>>>> This is making me thing that the entire page is getting replaced
>>>> and not
>>>> using ajax.
>>>>
>>>> Is is possible to get IPagingNavigationIncrementLink to use
>>>> href="#"
>>>> instead of updating the url?
>>>>
>>>> D/
>>>>
>>>>
>>>
>>>
>>> --
>>> Pedro Henrique Oliveira dos Santos
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> --
> Pedro Henrique Oliveira dos Santos
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]