I'm having a problem with DropDownChoice components & FormTester.  I've
declared my DropDownChoice as required, which works fine via the browser -
the correct validation feedback is given when I fail to make a selection.

However, when trying to write a test demonstrating this, no validation
feedback is given.  It seems that when using the browser,
FormComponent.checkRequired() is given the input as "" (empty string), and
so correctly declares this as invalid.  But when using FormTester,
FormComponent.checkRequired() is given the input as "-1", and so correctly
declares this as valid.

This smells like a bug somewhere inside FormTester - the value "-1" should
not be set for a DropDownChoice with no selection.  If I call
FormTester.setValue(dropDownId, "") before calling FormTester.submit(), I
get the desired behaviour, but obviously that's pretty ugly.  Anyone got any
ideas or should I raise a JIRA?
-- 
View this message in context: 
http://www.nabble.com/FormTester%2C-DropDownChoice---Validation-tf3884382.html#a11009710
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to