Issue Details (XML | Word | Printable)

Key: WICKET-1545
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Major Major
Assignee: Igor Vaynberg
Reporter: Alexei Sokolov
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Wicket

problems with stateless forms and radiogroups/checkgroups

Created: 16/Apr/08 05:02 PM   Updated: 01/Feb/09 10:19 PM
Return to search
Component/s: wicket
Affects Version/s: 1.3.3
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Reference
 

Resolution Date: 01/Feb/09 10:19 PM


 Description  « Hide
I'm trying to use radiogroup/checkgroup with stateless form, and it is not possible at the moment. I get the following exception:

submitted http post value [radio4] for RadioGroup component [0:form:whatever] is illegal because it does not contain relative path to a Radio componnet. Due to this the RadioGroup component cannot resolve the selected Radio component pointed to by the illegal value. A possible reason is that component hierarchy changed between rendering and form submission.

I think the problem lies inside Check & Radio components, which use Page.getAutoIndex() and that value is different before and after page submission for Check/Radio components.

Now, it is not possible to override getValue() on Check/Radio components, so I'm kind of stuck now...

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Igor Vaynberg added a comment - 01/Feb/09 10:19 PM
we cannot fix this because the components are simply not stateless.

i have done two things:
a) overrode getstatelesshint() which now properly returns false letting wicket know these components are not stateless
b) made getvalue() non-final
c) added javadoc to both radio and check to explain how to make them stateless.