[ 
https://issues.apache.org/jira/browse/WICKET-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501316
 ] 

Alastair Maw commented on WICKET-607:
-------------------------------------

Even if we fix this (put in an ugly catch block, for example), things still 
didn't work, due to QueryStringUrlCodingStrategy not knowing about 
BookmarkableListenerRequestTargets (see the special-case code in 
BookmarkablePageRequestTargetUrlCodingStrategy.decode() for example).

I fixed that in trunk in r544204, only I'm now not sure I've done the right 
thing - I think maybe we should be calling 
AbstractRequestCycleProcessor.resolveBookmarkablePage() instead, as that does 
much the same thing. Problem is, they're on different "layers" of the code, if 
you see what I mean.

Perhaps the code needs factoring out? Or maybe QueryStringUrlCodingStrategy 
needs to not extend BookmarkablePageRequestTargetUrlCodingStrategy? Or 
something else?

I'm not sure what's best to do here, and would appreciate some help from 
someone more familiar with the code. 

> Stateless forms don't work with QueryStringUrlCodingStrategy
> ------------------------------------------------------------
>
>                 Key: WICKET-607
>                 URL: https://issues.apache.org/jira/browse/WICKET-607
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: N/A
>            Reporter: Nick Heudecker
>             Fix For: 1.3.0-rc1
>
>
> Trying to submit a stateless form to a page using 
> QueryStringUrlCodingStrategy results in a NumberFormatException on the form's 
> name:
> java.lang.NumberFormatException: For input string: "myStatelessForm"
>      at 
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>      at java.lang.Integer.parseInt(Integer.java:447)
>      at java.lang.Integer.parseInt(Integer.java:497)
>      at 
> org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:519)
>      at 
> org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:188)
>      at org.apache.wicket.Request.getRequestParameters(Request.java:179)
>      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1049)
>      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1135)
>      at org.apache.wicket.RequestCycle.request(RequestCycle.java:490)
>      at 
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:248)
>      at 
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to