You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vytautas Čivilis <vy...@gmail.com> on 2009/08/24 17:10:11 UTC

RequestCycle bug at urlFor?

Hi.

I'm using RequestCycle urlFor method for building my link in this
fashion: getRequestCycle().urlFor(this, ILinkListener.INTERFACE,
parameters).

The idea is to have link with default behavior (implement onclick), but
with the explicitly set parameters too. The parameters are being asked
by 3rd party library (in particular - thickbox).

at RequestCycle 947:
AppendingStringBuffer buff = new AppendingStringBuffer(url);
WebRequestEncoder encoder = new WebRequestEncoder(buff);

This WebRequestEncoder doesn't check, if the parameters are already
present in the url provided.

In my case, the url from CharSequence url = encodeUrlFor(target); is
already like that
?wicket:interface=:2:admin:container:tabbedPanel:panel:apartments:0:apartmentAddressEditLink:1:ILinkListener::

What WebRequestEncoder does when appending parameters provided
explicitly - it simply appends "?" mark and then the parameters list.

So resulting url is incorrect and doesn't work:
?wicket:interface=:2:admin:container:tabbedPanel:panel:apartments:0:apartmentAddressEditLink:1:ILinkListener::?height=300&width=300

(notice leading ?height=300&width=300).

Wicket 1.4.0.

Am I doing something wrong here? What could be possible solutions to
overcome this?

Vytautas

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


Re: RequestCycle bug at urlFor?

Posted by Vytautas Čivilis <vy...@gmail.com>.
Hi Francisco.

It's certainly the same location in code, but the issues are a bit
different.

I've filed the bug at https://issues.apache.org/jira/browse/WICKET-2434

Vytautas

francisco treacy wrote:
> Hi Vytautas,
> 
> Honestly I don't know if it's the same problem but I did went through
> lots of debugging due to urlFor a couple of months ago. I posted an
> issue but actually haven't followed its progress (it's still open).
> 
> https://issues.apache.org/jira/browse/WICKET-2204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> 
> Just thought it would be relevant mentioning.
> 
> Francisco
> 
> 
> 2009/8/24 Vytautas Čivilis <vy...@gmail.com>:
>> Hi.
>>
>> I'm using RequestCycle urlFor method for building my link in this
>> fashion: getRequestCycle().urlFor(this, ILinkListener.INTERFACE,
>> parameters).
>>
>> The idea is to have link with default behavior (implement onclick), but
>> with the explicitly set parameters too. The parameters are being asked
>> by 3rd party library (in particular - thickbox).
>>
>> at RequestCycle 947:
>> AppendingStringBuffer buff = new AppendingStringBuffer(url);
>> WebRequestEncoder encoder = new WebRequestEncoder(buff);
>>
>> This WebRequestEncoder doesn't check, if the parameters are already
>> present in the url provided.
>>
>> In my case, the url from CharSequence url = encodeUrlFor(target); is
>> already like that
>> ?wicket:interface=:2:admin:container:tabbedPanel:panel:apartments:0:apartmentAddressEditLink:1:ILinkListener::
>>
>> What WebRequestEncoder does when appending parameters provided
>> explicitly - it simply appends "?" mark and then the parameters list.
>>
>> So resulting url is incorrect and doesn't work:
>> ?wicket:interface=:2:admin:container:tabbedPanel:panel:apartments:0:apartmentAddressEditLink:1:ILinkListener::?height=300&width=300
>>
>> (notice leading ?height=300&width=300).
>>
>> Wicket 1.4.0.
>>
>> Am I doing something wrong here? What could be possible solutions to
>> overcome this?
>>
>> Vytautas
>>
>> ---------------------------------------------------------------------
>> 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


Re: RequestCycle bug at urlFor?

Posted by francisco treacy <fr...@gmail.com>.
Hi Vytautas,

Honestly I don't know if it's the same problem but I did went through
lots of debugging due to urlFor a couple of months ago. I posted an
issue but actually haven't followed its progress (it's still open).

https://issues.apache.org/jira/browse/WICKET-2204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Just thought it would be relevant mentioning.

Francisco


2009/8/24 Vytautas Čivilis <vy...@gmail.com>:
> Hi.
>
> I'm using RequestCycle urlFor method for building my link in this
> fashion: getRequestCycle().urlFor(this, ILinkListener.INTERFACE,
> parameters).
>
> The idea is to have link with default behavior (implement onclick), but
> with the explicitly set parameters too. The parameters are being asked
> by 3rd party library (in particular - thickbox).
>
> at RequestCycle 947:
> AppendingStringBuffer buff = new AppendingStringBuffer(url);
> WebRequestEncoder encoder = new WebRequestEncoder(buff);
>
> This WebRequestEncoder doesn't check, if the parameters are already
> present in the url provided.
>
> In my case, the url from CharSequence url = encodeUrlFor(target); is
> already like that
> ?wicket:interface=:2:admin:container:tabbedPanel:panel:apartments:0:apartmentAddressEditLink:1:ILinkListener::
>
> What WebRequestEncoder does when appending parameters provided
> explicitly - it simply appends "?" mark and then the parameters list.
>
> So resulting url is incorrect and doesn't work:
> ?wicket:interface=:2:admin:container:tabbedPanel:panel:apartments:0:apartmentAddressEditLink:1:ILinkListener::?height=300&width=300
>
> (notice leading ?height=300&width=300).
>
> Wicket 1.4.0.
>
> Am I doing something wrong here? What could be possible solutions to
> overcome this?
>
> Vytautas
>
> ---------------------------------------------------------------------
> 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