Re: Which url coding strategy to make more restful in page with navigator?
I recognize the same behavior: the panel renders ok but clicking on the navigator links has no effect. Can anybody help here? Nowaker wrote: I tried to use your BookmarkablePagingNavigator but it doesn't work. Clicking next, prev or page number has no effect. The panel itself renders OK. // It's org.wicketstuff.annotation @MountPath(path = oldest) @MountMixedParam(parameterNames = {page}) public class Oldest extends WebPage { public Oldest() { EntriesDataView entries = new EntriesDataView(entry, new EntriesDataProvider(dao, entryMode), itemsPerPage); add(entries); add(new BookmarkablePagingNavigator(navigator, entries, getClass())); } } The links for @MountMixedParam look like http://localhost:8080/oldest/1 and so on. With no explicit MountParam they look like /oldest/page/1. I was using Wicket 1.4.9 but I tried 1.4.7 also (the version you entered in JIRA issue). Have you got any idea? Or maybe provide full code, including Data Views and Panels? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Which-url-coding-strategy-to-make-more-restful-in-page-with-navigator-tp2197248p2318599.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Which url coding strategy to make more restful in page with navigator?
I tried to use your BookmarkablePagingNavigator but it doesn't work. Clicking next, prev or page number has no effect. The panel itself renders OK. // It's org.wicketstuff.annotation @MountPath(path = oldest) @MountMixedParam(parameterNames = {page}) public class Oldest extends WebPage { public Oldest() { EntriesDataView entries = new EntriesDataView(entry, new EntriesDataProvider(dao, entryMode), itemsPerPage); add(entries); add(new BookmarkablePagingNavigator(navigator, entries, getClass())); } } The links for @MountMixedParam look like http://localhost:8080/oldest/1 and so on. With no explicit MountParam they look like /oldest/page/1. I was using Wicket 1.4.9 but I tried 1.4.7 also (the version you entered in JIRA issue). Have you got any idea? Or maybe provide full code, including Data Views and Panels? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Which-url-coding-strategy-to-make-more-restful-in-page-with-navigator-tp2197248p2281681.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Which url coding strategy to make more restful in page with navigator?
please attach your code to a jira issue so it doesnt get lost. -igor 2010/5/14 cleverpig greatclever...@gmail.com: hi,everybody! 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). 2010/5/14 cleverpig greatclever...@gmail.com: thanks,igor! but where can I find out this bookmarkable paging navigator? I only get it:http://apache-wicket.1842946.n4.nabble.com/PageNavigator-Vs-Nice-Url-td1848271.html#a1848272 but that is a old track about nice url and paging navigator,including a lot discuss without final result. 2010/5/13 Igor Vaynberg igor.vaynb...@gmail.com: if you use a bookmarkable paging navigator then even the default mounting strategy will work. you can probably find one by searching the list. -igor On Thu, May 13, 2010 at 12:56 AM, cleverpig greatclever...@gmail.com wrote: hi,everybody! 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. I look forward to using MixedParamUrlCodingStrategy, which may need to find out navigation links parameter name in the navigator,such as:first,next,etc! Not sure we have a better solution, please guide me~ -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Which url coding strategy to make more restful in page with navigator?
ok,I'd created a improvement issue: https://issues.apache.org/jira/browse/WICKET-2876 2010/5/17 Igor Vaynberg igor.vaynb...@gmail.com: please attach your code to a jira issue so it doesnt get lost. -igor 2010/5/14 cleverpig greatclever...@gmail.com: hi,everybody! 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). 2010/5/14 cleverpig greatclever...@gmail.com: thanks,igor! but where can I find out this bookmarkable paging navigator? I only get it:http://apache-wicket.1842946.n4.nabble.com/PageNavigator-Vs-Nice-Url-td1848271.html#a1848272 but that is a old track about nice url and paging navigator,including a lot discuss without final result. 2010/5/13 Igor Vaynberg igor.vaynb...@gmail.com: if you use a bookmarkable paging navigator then even the default mounting strategy will work. you can probably find one by searching the list. -igor On Thu, May 13, 2010 at 12:56 AM, cleverpig greatclever...@gmail.com wrote: hi,everybody! 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. I look forward to using MixedParamUrlCodingStrategy, which may need to find out navigation links parameter name in the navigator,such as:first,next,etc! Not sure we have a better solution, please guide me~ -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031
Re: Which url coding strategy to make more restful in page with navigator?
if you use a bookmarkable paging navigator then even the default mounting strategy will work. you can probably find one by searching the list. -igor On Thu, May 13, 2010 at 12:56 AM, cleverpig greatclever...@gmail.com wrote: hi,everybody! 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. I look forward to using MixedParamUrlCodingStrategy, which may need to find out navigation links parameter name in the navigator,such as:first,next,etc! Not sure we have a better solution, please guide me~ -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Which url coding strategy to make more restful in page with navigator?
thanks,igor! but where can I find out this bookmarkable paging navigator? I only get it:http://apache-wicket.1842946.n4.nabble.com/PageNavigator-Vs-Nice-Url-td1848271.html#a1848272 but that is a old track about nice url and paging navigator,including a lot discuss without final result. 2010/5/13 Igor Vaynberg igor.vaynb...@gmail.com: if you use a bookmarkable paging navigator then even the default mounting strategy will work. you can probably find one by searching the list. -igor On Thu, May 13, 2010 at 12:56 AM, cleverpig greatclever...@gmail.com wrote: hi,everybody! 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. I look forward to using MixedParamUrlCodingStrategy, which may need to find out navigation links parameter name in the navigator,such as:first,next,etc! Not sure we have a better solution, please guide me~ -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org