You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Hendy Irawan (JIRA)" <ji...@apache.org> on 2014/12/02 04:02:12 UTC

[jira] [Commented] (WICKET-2876) bookmarkable paging navigator

    [ https://issues.apache.org/jira/browse/WICKET-2876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14230892#comment-14230892 ] 

Hendy Irawan commented on WICKET-2876:
--------------------------------------

this is weird... why create this issue and immediately close it?

seems very useful for me (and a lot of users), see http://techiesinsight.blogspot.com/2013/02/custom-pagingnavigator-for-seo-friendly.html

> bookmarkable paging navigator
> -----------------------------
>
>                 Key: WICKET-2876
>                 URL: https://issues.apache.org/jira/browse/WICKET-2876
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>         Environment: web dev environment: wicket1.4.7 jdk1.6 tomcat6.0 
> system environment: Windows xp
>            Reporter: cleverpig
>              Labels: bookmarkable, navigator, paging, restful
>         Attachments: code.zip
>
>
> Thanks Igor Vaynberg and every sharer!
> I checked a variety url coding strategies, but did not find one that is very appropriate when using datatable and navigator in page.
> HybridUrlCodingStrategy might also be, but it can not display the page parameter in url, can not be true bookmarkable.
> And the version number int its url will make the user confused.
> So I look forward to using MixedParamUrlCodingStrategy, which may need to find out navigation links parameter name in the navigator,such as:first,next,etc!
> Maybe we should not do the same thing to reinvent the wheel.
> After a morning of thinking and programming, I wrote a few simple restful navigator implement!
> Here are main 4 classes:
> 1.BookmarkablePagingNavigator
> 2.BookmarkablePagingNavigation
> 3.BookmarkablePagingNavigationLink
> 4.BookmarkablePagingNavigationIncrementLink
> Core idea is to override PagingNavigator and PagingNavigation classes' newPagingNavigationLink and newPagingNavigationIncrementLink methods.
> BookmarkablePagingNavigationLink extends from PagingNavigationLink.
> BookmarkablePagingNavigationLink's work depends on CharSequence getURL() method:
> protected CharSequence getURL () (
>       if (getPopupSettings ()! = null)
>            throw new IllegalStateException ("You cannot specify popup settings and a page map");
>        PageParameters parameters = getPageParameters ();
>        if (getPopupSettings ()! = null)
>            return urlFor (getPopupSettings (). getPageMap (this),
> getPageClass (), parameters);
>        else
>            return urlFor (getPageClass (), parameters);
> )
> I'm so glad to give my gift:I put these classes as attachment with this mail,please share it~
> TO FIX: it can not handle the search bar of the parameters or other parameters of DataTable Headers(such as sort param).
> Here is our discuss track:
> http://apache-wicket.1842946.n4.nabble.com/Which-url-coding-strategy-to-make-more-restful-in-page-with-navigator-tp2197248p2197248.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)