On Wed, Mar 21, 2012 at 6:10 PM, Igor Vaynberg <[email protected]> wrote:
> button.setdefaultformprocessing(false) ?

He needs to save the values without validation. Calling
button.setdefaultformprocessing(false) wont update the models.

>
> -igor
>
>
> On Wed, Mar 21, 2012 at 3:30 AM, Martin Grigorov <[email protected]> wrote:
>> Hi,
>>
>> We needed once to do something similar and we came with the following 
>> solution:
>> override FormComponent#validate() for the components which have
>> validators and do:
>> public void validate() {
>>   if (getForm().findSubmittingButton() != saveButton) {
>>     super.validate()
>>   }
>> }
>>
>> i.e. validate for all buttons but the one you want to skip.
>>
>> HTH
>>
>> On Wed, Mar 21, 2012 at 12:03 PM, stoupa <[email protected]> wrote:
>>> I have a form that has two submit buttons. One is a "Save" button that just
>>> persists the model object of the form and the other is a "Send for approval"
>>> button that causes the data in the form to be processed in the application.
>>> I need to make some of the fields mandatory, but there is a requirement that
>>> the "Save" button should not trigger any validators, the user should always
>>> be able to save his form.
>>> Is there a clean way how to achieve this behaviour in Wicket? I'm using
>>> version 1.4.
>>>
>>> --
>>> View this message in context: 
>>> http://apache-wicket.1842946.n4.nabble.com/Two-submit-buttons-in-a-form-one-of-them-does-not-trigger-validation-tp4491781p4491781.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to