Author: almaw Date: Sat Jun 30 11:40:37 2007 New Revision: 552197 URL: http://svn.apache.org/viewvc?view=rev&rev=552197 Log: WICKET-714 - PagingNavigation examples in javadoc are out of date
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java?view=diff&rev=552197&r1=552196&r2=552197 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java Sat Jun 30 11:40:37 2007 @@ -25,7 +25,7 @@ * PageableListView. * <p> * For each row (one page of the list of pages) a [EMAIL PROTECTED] PagingNavigationLink}will - * be added that contains a [EMAIL PROTECTED] Label}with the page number of that link + * be added that contains a [EMAIL PROTECTED] Label} with the page number of that link * (1..n). * * <pre> @@ -41,9 +41,7 @@ * thus renders like: * * <pre> - * * 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | - * * </pre> * * </p> @@ -52,39 +50,35 @@ * For instance: * * <pre> - * protected void populateItem(ListItem listItem) - * { - * final int page = ((Integer)listItem.getModelObject()).intValue(); - * final PagingNavigationLink link = new PagingNavigationLink("pageLink", pageableListView, page); - * if (page > 0) - * { - * listItem.add(new Label("separator", "|")); - * } - * else - * { - * listItem.add(new Label("separator", "")); - * } - * link.add(new Label("pageNumber", String.valueOf(page + 1))); - * link.add(new Label("pageLabel", "page")); - * listItem.add(link); - * } + * protected void populateItem(LoopItem loopItem) { + * final int page = loopItem.getIteration(); + * final PagingNavigationLink link = new PagingNavigationLink("pageLink", pageableListView, page); + * if (page > 0) { + * loopItem.add(new Label("separator", "|")); + * } else { + * loopItem.add(new Label("separator", "")); + * } + * link.add(new Label("pageNumber", String.valueOf(page + 1))); + * link.add(new Label("pageLabel", "page")); + * loopItem.add(link); + * } * </pre> * * With: * * <pre> - * <td wicket:id="navigation"> - * <span wicket:id="separator"/> - * <a wicket:id="pageLink" href="#"> - * <span wicket:id="pageLabel"/><span wicket:id="pageNumber"/> - * </a> - * </td> + * <span wicket:id="navigation"> + * <span wicket:id="separator"></span> + * <a wicket:id="pageLink" href="#"> + * <span wicket:id="pageLabel"></span><span wicket:id="pageNumber"></span> + * </a> + * </span> * </pre> * * renders like: * * <pre> - * page1 | page2 | page3 | page4 | page5 | page6 | page7 | page8 | page9 + * page1 | page2 | page3 | page4 | page5 | page6 | page7 | page8 | page9 * </pre> * * </p>