I dont exactly see from your code the error, but the wiki has a page related
to this
http://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html

if you use ajax, then you need to be sure that there is already a markupID
on the output wich is usually not existent in a listview (you could add a
WebMarkupContainer for example however) and that the target is then updated
accordingly...

regards
 

> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im Auftrag 
> von Tremelune
> Gesendet: Dienstag, 22. Mai 2007 17:33
> An: wicket-user@lists.sourceforge.net
> Betreff: [Wicket-user] Updating item range for ajax pager
> 
> 
> I've got an ajax pager in a custom panel. Part of this panel 
> displays the page range (ie, "Viewing items 11-20 of 500"). 
> The panel is constructed once when the page is loaded:
> 
>   public AwesomePanel(final String id) {
>     ...
> 
>     container.add(pageListView);
>     container.add(new PagerPanel("pagerPanel", pageListView));
> 
>     add(container);
>   }
> 
> 
> 
>   PagerPanel(final String id, final PageableListView view) {
>     super(id);
> 
>     final int first = view.getStartIndex();
> 
>     add(new Label("firstItem", String.valueOf(first + 1))); 
> //Start at 1, not zero.
>     add(new Label("lastItem", String.valueOf(first + 
> view.getRowsPerPage())));
>     add(new Label("totalItems", 
> String.valueOf(view.getList().size())));
>     add(new PagingNavigator("pager", view));
>   }
> 
> 
> 
> When a paging link is clicked, the PagerPanel is not 
> reconstructed, so firstItem and lastItem do not get updated. 
> Is there an appropriate event I should be looking for to 
> update the first/last items? The pager may not always be 
> ajaxy, and I would like to tie the update to a more general 
> event, if possible.
> --
> View this message in context: 
> http://www.nabble.com/Updating-item-range-for-ajax-pager-tf379
7101.html#a10740479
> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to