Re: Wicket 1.5 - How to configure link generated url?
Hi, You can use mountPage(login, LoginPage.class); add(new BookmarkablePageLink(link-login, LoginPage.class)) this will generate: /login. Whay do you want to replace '~' ? On Wed, Sep 19, 2012 at 1:47 PM, Nicolas Tacheny nicolas.tach...@gmail.com wrote: I'm coding a wicket 1.5 application and I need to control the way url are rendered for security reason. mountPage(xxx/yyy, Zzzz.class) is excellent for that but I have a problem with url generated for link listener. For exemple, if I add the following link to my page: add(new LinkVoid(link-login) { @Override public void onClick() { setResponsePage(LoginPage.class); } }); I obtain the following generated markup: a wicket:id=link-login href=./home?0-1.ILinkListener-accessMenu-link~loginLogin/a Is there a way to configure the generated url (./home?0-1.ILinkListener-accessMenu-link~login)? At least, I would like to remove the ~ character. Tx for replies - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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: Wicket 1.5 - How to configure link generated url?
Tx, it's ok with a BookmarkablePageLink but is there a way to configure that for Link in case I need to implement specifics behaviors in onClick? It's a security constraint in the owner company. My web app will be behind a Web Application Firewall (apache module) in which there are rules disabling ~ in url. On 19 Sep 2012, at 12:53, Martin Grigorov wrote: Hi, You can use mountPage(login, LoginPage.class); add(new BookmarkablePageLink(link-login, LoginPage.class)) this will generate: /login. Whay do you want to replace '~' ? On Wed, Sep 19, 2012 at 1:47 PM, Nicolas Tacheny nicolas.tach...@gmail.com wrote: I'm coding a wicket 1.5 application and I need to control the way url are rendered for security reason. mountPage(xxx/yyy, Zzzz.class) is excellent for that but I have a problem with url generated for link listener. For exemple, if I add the following link to my page: add(new LinkVoid(link-login) { @Override public void onClick() { setResponsePage(LoginPage.class); } }); I obtain the following generated markup: a wicket:id=link-login href=./home?0-1.ILinkListener-accessMenu-link~loginLogin/a Is there a way to configure the generated url (./home?0-1.ILinkListener-accessMenu-link~login)? At least, I would like to remove the ~ character. Tx for replies - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 - How to configure link generated url?
By default Wicket uses '-' as url-encoded version of the component path separator (':'). Wicket uses '~' only if your component id has '-' in its name. So the easiest solution to avoid '~' is to not use '-' in the component ids. I.e. rename 'link-login' to 'linkLogin'. On Wed, Sep 19, 2012 at 2:04 PM, Nicolas Tacheny nicolas.tach...@gmail.com wrote: Tx, it's ok with a BookmarkablePageLink but is there a way to configure that for Link in case I need to implement specifics behaviors in onClick? It's a security constraint in the owner company. My web app will be behind a Web Application Firewall (apache module) in which there are rules disabling ~ in url. On 19 Sep 2012, at 12:53, Martin Grigorov wrote: Hi, You can use mountPage(login, LoginPage.class); add(new BookmarkablePageLink(link-login, LoginPage.class)) this will generate: /login. Whay do you want to replace '~' ? On Wed, Sep 19, 2012 at 1:47 PM, Nicolas Tacheny nicolas.tach...@gmail.com wrote: I'm coding a wicket 1.5 application and I need to control the way url are rendered for security reason. mountPage(xxx/yyy, Zzzz.class) is excellent for that but I have a problem with url generated for link listener. For exemple, if I add the following link to my page: add(new LinkVoid(link-login) { @Override public void onClick() { setResponsePage(LoginPage.class); } }); I obtain the following generated markup: a wicket:id=link-login href=./home?0-1.ILinkListener-accessMenu-link~loginLogin/a Is there a way to configure the generated url (./home?0-1.ILinkListener-accessMenu-link~login)? At least, I would like to remove the ~ character. Tx for replies - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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: Wicket 1.5 - How to configure link generated url?
Hallelujah! Tx a lot. On 19 Sep 2012, at 13:18, Martin Grigorov wrote: By default Wicket uses '-' as url-encoded version of the component path separator (':'). Wicket uses '~' only if your component id has '-' in its name. So the easiest solution to avoid '~' is to not use '-' in the component ids. I.e. rename 'link-login' to 'linkLogin'. On Wed, Sep 19, 2012 at 2:04 PM, Nicolas Tacheny nicolas.tach...@gmail.com wrote: Tx, it's ok with a BookmarkablePageLink but is there a way to configure that for Link in case I need to implement specifics behaviors in onClick? It's a security constraint in the owner company. My web app will be behind a Web Application Firewall (apache module) in which there are rules disabling ~ in url. On 19 Sep 2012, at 12:53, Martin Grigorov wrote: Hi, You can use mountPage(login, LoginPage.class); add(new BookmarkablePageLink(link-login, LoginPage.class)) this will generate: /login. Whay do you want to replace '~' ? On Wed, Sep 19, 2012 at 1:47 PM, Nicolas Tacheny nicolas.tach...@gmail.com wrote: I'm coding a wicket 1.5 application and I need to control the way url are rendered for security reason. mountPage(xxx/yyy, Zzzz.class) is excellent for that but I have a problem with url generated for link listener. For exemple, if I add the following link to my page: add(new LinkVoid(link-login) { @Override public void onClick() { setResponsePage(LoginPage.class); } }); I obtain the following generated markup: a wicket:id=link-login href=./home?0-1.ILinkListener-accessMenu-link~loginLogin/a Is there a way to configure the generated url (./home?0-1.ILinkListener-accessMenu-link~login)? At least, I would like to remove the ~ character. Tx for replies - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org