You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by aditsu <ad...@yahoo.com> on 2008/10/17 12:48:44 UTC
RequestCycle.urlFor modifies a page's parameters?
Hi, I'm using wicket 1.4-m3
I was debugging a problem and I found that RequestCycle.urlFor(Component,
RequestListenerInterface, ValueMap) can sometimes modify the parameters of
an existing page.
Here's the relevant code:
if (listener != IRedirectListener.INTERFACE && component.isStateless() &&
page.isBookmarkable() && page.getStatelessHint())
{
PageParameters pageParameters = page.getPageParameters();
if (pageParameters == null)
{
pageParameters = new PageParameters();
}
if (params != null)
{
Iterator<Map.Entry<String, Object>> it = params.entrySet().iterator();
while (it.hasNext())
{
final Map.Entry<String, Object> entry = it.next();
final String key = entry.getKey();
final String value = entry.getValue().toString();
// Do not encode values here. It is the encoder's job
// to do the endoding. This leads to double encoding
// - Doug Donohoe
// @see https://issues.apache.org/jira/browse/WICKET-1627
pageParameters.add(key, value);
}
}
Is this normal?
--
View this message in context: http://www.nabble.com/RequestCycle.urlFor-modifies-a-page%27s-parameters--tp20031013p20031013.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: RequestCycle.urlFor modifies a page's parameters?
Posted by aditsu <ad...@yahoo.com>.
igor.vaynberg wrote:
>
> i dont think this is normal. please file a jira issue.
>
Filed WICKET-1881
Thanks
Adrian
--
View this message in context: http://www.nabble.com/RequestCycle.urlFor-modifies-a-page%27s-parameters--tp20031013p20077002.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: RequestCycle.urlFor modifies a page's parameters?
Posted by Igor Vaynberg <ig...@gmail.com>.
i dont think this is normal. please file a jira issue.
-igor
On Fri, Oct 17, 2008 at 3:48 AM, aditsu <ad...@yahoo.com> wrote:
>
> Hi, I'm using wicket 1.4-m3
> I was debugging a problem and I found that RequestCycle.urlFor(Component,
> RequestListenerInterface, ValueMap) can sometimes modify the parameters of
> an existing page.
> Here's the relevant code:
>
> if (listener != IRedirectListener.INTERFACE && component.isStateless() &&
> page.isBookmarkable() && page.getStatelessHint())
> {
> PageParameters pageParameters = page.getPageParameters();
> if (pageParameters == null)
> {
> pageParameters = new PageParameters();
> }
>
> if (params != null)
> {
> Iterator<Map.Entry<String, Object>> it =
> params.entrySet().iterator();
> while (it.hasNext())
> {
> final Map.Entry<String, Object>
> entry = it.next();
> final String key = entry.getKey();
> final String value =
> entry.getValue().toString();
> // Do not encode values here. It is
> the encoder's job
> // to do the endoding. This leads to
> double encoding
> // - Doug Donohoe
> // @see
> https://issues.apache.org/jira/browse/WICKET-1627
> pageParameters.add(key, value);
> }
> }
>
> Is this normal?
>
> --
> View this message in context:
> http://www.nabble.com/RequestCycle.urlFor-modifies-a-page%27s-parameters--tp20031013p20031013.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>