You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Matthias Klass <ma...@fh-augsburg.de> on 2010/06/23 17:10:56 UTC

Problems with AjaxPagingNavigation

Hi,

I've added a AjaxPagingNavigation to a Panel. Yet, when clicking on the 
created link nothing happens - no redirection to the new page. When I 
copy the link directly from the markup and paste it into the browser 
window, the new page shows up - it's just about the "click" link.

First I created a PageableListView:

/PageableListView<Campaign> campaignList = new 
PageableListView<Campaign>("campaignList", campaigns, pagesize) {
     (...)
}/

Afterwards I added the campaignList and the Navigator to a markup container:

/        WebMarkupContainer container = new 
WebMarkupContainer("campaignList.listContainer");
         container.add(campaignList);


         AjaxPagingNavigation navigation = new 
AjaxPagingNavigation("campaignList.navigation", campaignList);
         container.add(navigation);

         if (campaignList.getModelObject().size() < pagesize) {
             navigation.setVisible(false);
         }

         add(container);/

The markup is the following:
/ <div wicket:id="campaignList.listContainer">
<ul class="campaignListlist">
             (...)
</ul>

<span wicket:id="campaignList.navigation">
<a wicket:id="pageLink" href="#">
<span wicket:id="pageNumber"></span>
</a>
</span>
</div>
/
What am I doing wrong? Should I use the AjexPagingNavigator instead? 
What's the difference?

Thank you very much in advance,
Matthias


Re: Problems with AjaxPagingNavigation

Posted by Igor Vaynberg <ig...@gmail.com>.
use the navigator

-igor

On Wed, Jun 23, 2010 at 8:10 AM, Matthias Klass
<ma...@fh-augsburg.de> wrote:
> Hi,
>
> I've added a AjaxPagingNavigation to a Panel. Yet, when clicking on the
> created link nothing happens - no redirection to the new page. When I copy
> the link directly from the markup and paste it into the browser window, the
> new page shows up - it's just about the "click" link.
>
> First I created a PageableListView:
>
> /PageableListView<Campaign> campaignList = new
> PageableListView<Campaign>("campaignList", campaigns, pagesize) {
>    (...)
> }/
>
> Afterwards I added the campaignList and the Navigator to a markup container:
>
> /        WebMarkupContainer container = new
> WebMarkupContainer("campaignList.listContainer");
>        container.add(campaignList);
>
>
>        AjaxPagingNavigation navigation = new
> AjaxPagingNavigation("campaignList.navigation", campaignList);
>        container.add(navigation);
>
>        if (campaignList.getModelObject().size() < pagesize) {
>            navigation.setVisible(false);
>        }
>
>        add(container);/
>
> The markup is the following:
> / <div wicket:id="campaignList.listContainer">
> <ul class="campaignListlist">
>            (...)
> </ul>
>
> <span wicket:id="campaignList.navigation">
> <a wicket:id="pageLink" href="#">
> <span wicket:id="pageNumber"></span>
> </a>
> </span>
> </div>
> /
> What am I doing wrong? Should I use the AjexPagingNavigator instead? What's
> the difference?
>
> Thank you very much in advance,
> Matthias
>
>

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