I think I know what is going on here. Eelco's case is for when the interface
is not in the query string. For example:
/sample/stateless/wicket:interface/:0:statelessform::IFormSubmitListener::/
His logic is necessary because the mount decoding logic happens after the
core wicket query string / form post processing logic. This raises the
question of why this is the case. It seems that the mount page logic was
added on after and this was done to make it work.
I think this bug was missed because none of the test cases in
StatelessStatefullUrlCodingStrategyTest execute the stateless form case
where the submission is the first encounter with the page. Instead, each
page is generated and then submitted meaning the page is found in the cache.
I found the bug testing when the session was deleted (by rebooting Tomcat).
Anyhow, I think my patch is correct, although some thought may need to be
given to the two locations for parameter parsing.
-Doug
Doug Donohoe wrote:
>
> Note that if Johan is correct that the wicket interface will never be
> there then this logic (rewritten and as it appears in my patch) can be
> removed:
>
> // the page map name should be defined already by logic done in
> // WebRequestCodingStrategy.decode(), but if not there, check
> // parameters. We always remove the interface parameter just in
> case.
> String pageMapNameEncoded =
> (String)parameters.remove(WebRequestCodingStrategy.PAGEMAP);
> if (requestParameters.getPageMapName() == null)
> {
> requestParameters.setPageMapName(pageMapNameEncoded);
> }
>
> // the interface should be defined already by logic done in
> // WebRequestCodingStrategy.decode(), but if not there, check
> // parameters. We always remove the pagemap parameter just in
> case.
> String interfaceParameter =
> (String)parameters.remove(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME);
> if (requestParameters.getInterfaceName() == null)
> {
>
> WebRequestCodingStrategy.addInterfaceParameters(interfaceParameter,
> requestParameters);
> }
>
> Basically, it depends on what Eelco was thinking when he originally wrote
> this.
>
--
View this message in context:
http://www.nabble.com/Bookmarkable---Stateless-form-submit-bug-%28eelco---need-your-advice%29-tp17304155p17308130.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.