You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Milan Křápek <He...@seznam.cz> on 2008/10/31 15:05:07 UTC

PageableListView with PagingNavigator

Hi I need a litle bit help.
 In my application I have several PageableListViews.  I set the number of items on one page to 10. And add some functionality that hides pagingNavigator when items.size <= 10 and show the pagingNavigator when I have more than 10 items. 
 But I have one problem with it. When I have 11 items and I am on the second page of my listView and I remove the last element, The pageableListView will stay on the second page even there are no items.
 Is there any way how can I set the pageableListView do go page down where there are no items on the current page?
Thanks for any advices.

Milan 

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


Re: PageableListView with PagingNavigator

Posted by Igor Vaynberg <ig...@gmail.com>.
strange, create a quickstart and attach it to a jira issue.

-igor

2008/10/31 Milan Křápek <He...@seznam.cz>:
> Yes. After any operation (add/remove) item I reload the page. I do not use Ajax refreshing, but I use setResponsePage method and my ListView model is LoadabledetachableModel so the data are reloaded. And the size of loaded data is 10, not 11. The ListView is shown on the second page that is empty.
>
> Milan
>
> when you remove the item does your list still contain 11 items?
> because the page view should go back to the last page if this happens
> automatically.
>
> -igor
>
> On Fri, Oct 31, 2008 at 7:05 AM, Milan Křápek <He...@seznam.cz> wrote:
>> Hi I need a litle bit help.
>> In my application I have several PageableListViews. I set the number of items on one page to 10. And add some functionality that hides pagingNavigator when items.size <= 10 and show the pagingNavigator when I have more than 10 items.
>> But I have one problem with it. When I have 11 items and I am on the second page of my listView and I remove the last element, The pageableListView will stay on the second page even there are no items.
>> Is there any way how can I set the pageableListView do go page down where there are no items on the current page?
>> Thanks for any advices.
>>
>> Milan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: PageableListView with PagingNavigator

Posted by Milan Křápek <He...@seznam.cz>.
Yes. After any operation (add/remove) item I reload the page. I do not use Ajax refreshing, but I use setResponsePage method and my ListView model is LoadabledetachableModel so the data are reloaded. And the size of loaded data is 10, not 11. The ListView is shown on the second page that is empty. 

Milan

when you remove the item does your list still contain 11 items?
because the page view should go back to the last page if this happens
automatically.

-igor

On Fri, Oct 31, 2008 at 7:05 AM, Milan Křápek <He...@seznam.cz> wrote:
> Hi I need a litle bit help.
> In my application I have several PageableListViews. I set the number of items on one page to 10. And add some functionality that hides pagingNavigator when items.size <= 10 and show the pagingNavigator when I have more than 10 items.
> But I have one problem with it. When I have 11 items and I am on the second page of my listView and I remove the last element, The pageableListView will stay on the second page even there are no items.
> Is there any way how can I set the pageableListView do go page down where there are no items on the current page?
> Thanks for any advices.
>
> Milan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: PageableListView with PagingNavigator

Posted by Igor Vaynberg <ig...@gmail.com>.
when you remove the item does your list still contain 11 items?
because the page view should go back to the last page if this happens
automatically.

-igor

On Fri, Oct 31, 2008 at 7:05 AM, Milan Křápek <He...@seznam.cz> wrote:
> Hi I need a litle bit help.
>  In my application I have several PageableListViews.  I set the number of items on one page to 10. And add some functionality that hides pagingNavigator when items.size <= 10 and show the pagingNavigator when I have more than 10 items.
>  But I have one problem with it. When I have 11 items and I am on the second page of my listView and I remove the last element, The pageableListView will stay on the second page even there are no items.
>  Is there any way how can I set the pageableListView do go page down where there are no items on the current page?
> Thanks for any advices.
>
> Milan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>