DropDownChoice loses selection after submit when model set via URL param
------------------------------------------------------------------------
Key: WICKET-4287
URL: https://issues.apache.org/jira/browse/WICKET-4287
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.5.3
Environment: Mac OSX Lion, JDK 1.6.0_29
Reporter: George Armhold
I'm seeing some surprising behavior with DropDownChoice. My page takes a param
and initializes a DropDownChoice model with it. So the drop-down can be
initialized via a param in the URL like ?sport=baseball.
I've got a submit button on the page, and I find that when the model is set via
the URL, clicking submit sets the drop-down choice to null, if it was
previously initialized via the URL. However if the user sets the drop-down
interactively, it "survives" the form submit.
I'll attach a quickstart that demonstrates it.
1. go to http://localhost:8080/?sport=baseball
2. click submit (without changing the drop-down)
3. observe that drop-down gets reset to "Any"
4. try choosing a sport via drop-down, say "archery"
5. click submit
6. observe that drop-down correctly preserves the choice
This is with 1.5.3; it does not reproduce with 1.4.18. The quickstart includes
a git project with 1.5.3 in master, and an additional branch "1.4.18" for
showing that it doesn't happen under that release.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira