wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: Wicket 1.5 - How to configure link generated url?
Date Wed, 19 Sep 2012 11:18:22 GMT
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.tacheny@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.tacheny@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 Link<Void>("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~login">Login</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-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message