You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2007/10/29 04:40:50 UTC

[jira] Resolved: (WICKET-1086) Extending PagingNavigator for stateless pages

     [ https://issues.apache.org/jira/browse/WICKET-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1086.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-beta5
         Assignee: Igor Vaynberg

patch applied, please attach an impl of a stateless paging navigator so we can add it to core... :)

> Extending PagingNavigator for stateless pages
> ---------------------------------------------
>
>                 Key: WICKET-1086
>                 URL: https://issues.apache.org/jira/browse/WICKET-1086
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 1.3.0-beta4
>            Reporter: John Patterson
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta5
>
>
> I am extending PagingNavigator to use stateless links but have found that the underlying PagingNavigation factory method newPagingNavigationLink() does not let me return a subclass of Link.  I have tested the change below and it seems to work OK on my stateless pages.
> Index: /Users/John/Development/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java
> ===================================================================
> --- /Users/John/Development/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java	(revision 585875)
> +++ /Users/John/Development/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigation.java	(working copy)
> @@ -17,6 +17,7 @@
>  package org.apache.wicket.markup.html.navigation.paging;
>  
>  import org.apache.wicket.markup.html.basic.Label;
> +import org.apache.wicket.markup.html.link.Link;
>  import org.apache.wicket.markup.html.list.Loop;
>  import org.apache.wicket.version.undo.Change;
>  
> @@ -302,7 +303,7 @@
>  		final int pageIndex = getStartIndex() + loopItem.getIteration();
>  
>  		// Add a page link pointing to the page
> -		final PagingNavigationLink link = newPagingNavigationLink("pageLink", pageable, pageIndex);
> +		final Link link = newPagingNavigationLink("pageLink", pageable, pageIndex);
>  		loopItem.add(link);
>  
>  		// Add a page number label to the list which is enclosed by the link
> @@ -329,8 +330,7 @@
>  	 *            the page index the link points to
>  	 * @return the page navigation link.
>  	 */
> -	protected PagingNavigationLink newPagingNavigationLink(String id, IPageable pageable,
> -			int pageIndex)
> +	protected Link newPagingNavigationLink(String id, IPageable pageable, int pageIndex)
>  	{
>  		return new PagingNavigationLink(id, pageable, pageIndex);
>  	}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.