Is there any way to enable/disable form validation based on which submit button I use? My page displays surveys, which are essentially rows of radiogroups and corresponding radios displayed in table like fashion. There are two buttons on the page, one called "Finish" that saves all the answers on the page and finalizes the survey so no further editing will occur. The other button is "Save and Exit" which just saves the current set of answers, so even if a radiogroup has no answer I still want to update my model. In one case with "Finish" I want to validate all radiogroups have an answer by using setRequired(true), while on the flip side with "Save and Exit" I don't need that validation.
I thought of using setDefaultFormProcessing(false) on the "Save and Exit" button and then manually populating the form model but Wicket ties model populating to validation. The updateModel() call in FormComponent simply calls getConvertedInput() to populate the model object. ConvertedInput is assigned its value during validate(). Only solution I can think of is to subclass RadioGroup and override updateModel() to convert the input and then set the model object. If there is a cleaner or better way to do this please let me know. -- View this message in context: http://www.nabble.com/Disable-form-validation-based-on-which-submit-button-used--tf4636406.html#a13241117 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
