Re: I don't want url page count parameter: localhost:8080/context/?0
On Sun, Mar 18, 2012 at 4:47 AM, Dan Retzlaff dretzl...@gmail.com wrote: Paolo, If you add stateful components or behaviors to your page, Wicket introduces the page version into the URL so that subsequent requests can be routed to the correct component and behavior instances. To get rid of the parameter, you should (1) make your page stateless, (2) implement your own IRequestMapper to track versions in another way, or (3) set IRequestCycleSettings#setRenderStrategy(RenderStrategy.REDIRECT_TO_RENDER). Actually it is RenderStrategy.ONE_PASS_RENDER I expect none of these will feel like a perfect solution for you, but you should evaluate them for yourself. Dan On Sat, Mar 17, 2012 at 6:51 PM, Paolo irresistible...@gmail.com wrote: Hi, I read this old post to solve the my same problem: --- I'm using Wicket 1.5.3, an application with a number of tabbed panels. My application's url is, lets say http://localhost:9080/context/ When I enter this URL, the browse immediately changes this to http://localhost:9080/context/?0 I don't want that!! When I enter userdata and switch some tabs, nothing happens, but when I hit F5 the URL changes to http://localhost:9080/context/?9 or another number, depending on my activity. I don't want that!! I read this suggested link: http://stackoverflow.com/questions/8081143/components-not-reloading-on-url-change-in-wicket-1-5-2 http://stackoverflow.com/questions/8135755/wicket-1-5-new-urls/8139152#8139152 BUT I DON'T UNDERSTAND TO SOLVE THE SIMPLE PROBLEM! I tried to change from String id = inparams.get(id).toString(); TO RequestCycle requestCycle = RequestCycle.get(); Request request = requestCycle.getRequest(); IRequestParameters irp = request.getRequestParameters(); String id = irp.getParameterValue(id).toString(); BUT NOTHING CHANGED! Please Help me, in this stupid wicket issue. Thank you -- 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: I don't want url page count parameter: localhost:8080/context/?0
Create a class NoVersionMount: /** * Provides a mount strategy that drops the version number from * stateful page urls. */ public class NoVersionMount extends MountedMapper { public NoVersionMount(String path, Class? extends IRequestablePage pageClass) { super(path, pageClass, new PageParametersEncoder()); } @Override protected void encodePageComponentInfo(Url url, PageComponentInfo info) { // do nothing so that component info does not get // rendered in url } @Override public Url mapHandler(IRequestHandler requestHandler) { if (requestHandler instanceof ListenerInterfaceRequestHandler) { return null; } else { return super.mapHandler(requestHandler); } } } And mount your pages using that mounted mapper, e.g.: mount(new NoVersionMount(myPage, MyPage.class)); Cheers, Gerrit On Sun, Mar 18, 2012, at 02:51, Paolo wrote: Hi, I read this old post to solve the my same problem: --- I'm using Wicket 1.5.3, an application with a number of tabbed panels. My application's url is, lets say http://localhost:9080/context/ When I enter this URL, the browse immediately changes this to http://localhost:9080/context/?0 I don't want that!! When I enter userdata and switch some tabs, nothing happens, but when I hit F5 the URL changes to http://localhost:9080/context/?9 or another number, depending on my activity. I don't want that!! I read this suggested link: http://stackoverflow.com/questions/8081143/components-not-reloading-on-url-change-in-wicket-1-5-2 http://stackoverflow.com/questions/8135755/wicket-1-5-new-urls/8139152#8139152 BUT I DON'T UNDERSTAND TO SOLVE THE SIMPLE PROBLEM! I tried to change from String id = inparams.get(id).toString(); TO RequestCycle requestCycle = RequestCycle.get(); Request request = requestCycle.getRequest(); IRequestParameters irp = request.getRequestParameters(); String id = irp.getParameterValue(id).toString(); BUT NOTHING CHANGED! Please Help me, in this stupid wicket issue. Thank you - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
I don't want url page count parameter: localhost:8080/context/?0
Hi, I read this old post to solve the my same problem: --- I'm using Wicket 1.5.3, an application with a number of tabbed panels. My application's url is, lets say http://localhost:9080/context/ When I enter this URL, the browse immediately changes this to http://localhost:9080/context/?0 I don't want that!! When I enter userdata and switch some tabs, nothing happens, but when I hit F5 the URL changes to http://localhost:9080/context/?9 or another number, depending on my activity. I don't want that!! I read this suggested link: http://stackoverflow.com/questions/8081143/components-not-reloading-on-url-change-in-wicket-1-5-2 http://stackoverflow.com/questions/8135755/wicket-1-5-new-urls/8139152#8139152 BUT I DON'T UNDERSTAND TO SOLVE THE SIMPLE PROBLEM! I tried to change from String id = inparams.get(id).toString(); TO RequestCycle requestCycle = RequestCycle.get(); Request request = requestCycle.getRequest(); IRequestParameters irp = request.getRequestParameters(); String id = irp.getParameterValue(id).toString(); BUT NOTHING CHANGED! Please Help me, in this stupid wicket issue. Thank you