Re: Create Url for Application Homepage
mount your home page for HomePage1: /home1 for HomePage2: /home2 voila! On Wed, Aug 24, 2011 at 10:28 PM, Christian Huber hub...@butterbrot.org wrote: Hi, the method Component#urlFor(Class pageClass, PageParameters parameters) allows you to create an application relative link that could be used as dynamic links or stored in a database to be accessed later. Now I noticed that links created for the page set as the applications HomePage the result does not contain the wicket:bookmarkablePage portion. I figure this is an optimization. Those links work fine as long as the HomePage class does not change. But what if due to some refactoring you want to set another page as application HomePage? Since those links usually contain page dependent parameters the chance old bookmark links won't work or even cause an application error are pretty high. So I would like to avoid this optimization to kick in and have all links created in the same way. Does anyone know if this can be done? Thanks, Chris -- The Sanity Resort http://sanityresort.blogspot.com/ -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Create Url for Application Homepage
Aaaahh.. cool. Works great. Thanks :-) The Sanity Resort http://sanityresort.blogspot.com/ Am 24.08.2011 21:44, schrieb Martin Grigorov: mount your home page for HomePage1: /home1 for HomePage2: /home2 voila! On Wed, Aug 24, 2011 at 10:28 PM, Christian Huberhub...@butterbrot.org wrote: Hi, the method Component#urlFor(Class pageClass, PageParameters parameters) allows you to create an application relative link that could be used as dynamic links or stored in a database to be accessed later. Now I noticed that links created for the page set as the applications HomePage the result does not contain the wicket:bookmarkablePage portion. I figure this is an optimization. Those links work fine as long as the HomePage class does not change. But what if due to some refactoring you want to set another page as application HomePage? Since those links usually contain page dependent parameters the chance old bookmark links won't work or even cause an application error are pretty high. So I would like to avoid this optimization to kick in and have all links created in the same way. Does anyone know if this can be done? Thanks, Chris -- The Sanity Resorthttp://sanityresort.blogspot.com/