You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by carlson weber filho - Master CIM Informática <cw...@mastercim.com.br> on 2009/07/23 21:31:03 UTC

Bypassing form validation

I have a form with two submit buttons. Is there any way to selectivelly 
bypass some validation on one of these buttons? I want to validate just 
two fields if I click on the button1 and I want to validate all fields 
when I click on button2

tx,

carlson

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by Jeremy Thomerson <je...@wickettraining.com>.
setDefaultFormProcessing(false)
http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)

--
Jeremy Thomerson
http://www.wickettraining.com




2009/7/23 carlson weber filho - Master CIM Informática
<cw...@mastercim.com.br>:
> I have a form with two submit buttons. Is there any way to selectivelly
> bypass some validation on one of these buttons? I want to validate just two
> fields if I click on the button1 and I want to validate all fields when I
> click on button2
>
> tx,
>
> carlson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by carlson weber filho - Master CIM Informática <cw...@mastercim.com.br>.
you're the man!
tx a lot

carlson
Igor Vaynberg escreveu:
> M1.processInput();
> if (M1.isValid()) { value=M1.getModelObject(); } else { handleerrror }
>
> -igor
>
> 2009/7/23 carlson weber filho - Master CIM Informática
> <cw...@mastercim.com.br>:
>   
>> Yes, I don't want to process it, but I want to do some processing based on
>> the form values. But I got the point, If I don't validate form, I won't get
>> my model updated. Now my problem goes back when I wanted to validate only
>> parts of my values, so let's supose the folowing scenario
>>
>> Master Form
>>  Field M1 - Required
>>  Field M2 - Required
>>  Field M3 - Required
>>  Detail Form
>>    Field D1 - Required
>>    Field D2 - Required
>>
>> When I submit Field D1, Field M1 must be not blank. I am checking this now
>> on code, not using a validator. I don't care at this time if Field M2 and
>> Field M3 are blank or not. I need the value of M1 because I do some
>> calculations on my detail object based on that. I tried using the
>> getRawInput() but it only returns the value of my select (the M1 field is a
>> select).
>>
>> Well, is there any solution for this case?
>>
>> tx
>>
>> carlson
>>
>>
>> Igor Vaynberg escreveu:
>>     
>>> you said you do not want to process the outer form.
>>>
>>> without validation you cannot update the model. eg if you put "aa"
>>> into an integer field how do we push that into an integer model? what
>>> you can do is call formcomponent.getinput() to get at the raw values
>>> of those components.
>>>
>>> -igor
>>>
>>>
>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>> <cw...@mastercim.com.br>:
>>>
>>>       
>>>> Well, I almost got what I want, but there's a problem. When I submit the
>>>> inner form, on the onSubmit I want to check some values of the master
>>>> form,
>>>> and the model doesn't get updated... Any hints here?
>>>>
>>>> tx
>>>> carlson
>>>> Dane Laverty escreveu:
>>>>
>>>>         
>>>>> This is sounding like a Chuck Norris joke -- "Wicket doesn't create
>>>>> invalid
>>>>> code -- it roundhouse kicks the rules until they submit!"
>>>>>
>>>>> On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson <
>>>>> jeremy@wickettraining.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>>           
>>>>>> Wicket takes care of that for you - you can do it in Wicket.
>>>>>>
>>>>>> --
>>>>>> Jeremy Thomerson
>>>>>> http://www.wickettraining.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>>>>> <cw...@mastercim.com.br>:
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> Isn't invalid to nest forms inside forms?
>>>>>>>
>>>>>>> Igor Vaynberg escreveu:
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>>> you should use embedded forms.
>>>>>>>>
>>>>>>>> make a form for M1
>>>>>>>>
>>>>>>>> inside it add another form D1
>>>>>>>>
>>>>>>>> a button in D1 form will only process D1 form, a button in M1 form
>>>>>>>> will process both.
>>>>>>>>
>>>>>>>> -igor
>>>>>>>>
>>>>>>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>>>>>>> <cw...@mastercim.com.br>:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> I already tried using setDefaultFormProcessing, but I want to
>>>>>>>>> actually
>>>>>>>>> process the form without validating it, on one of these buttons but
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>> using
>>>>>>
>>>>>>
>>>>>>             
>>>>>>>>> this method, I can't update my data, . Let me explain better. I have
>>>>>>>>> a
>>>>>>>>> master-detail form, supose I have fields M1, M2 and M3 on
>>>>>>>>> master-side
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>> and
>>>>>>
>>>>>>
>>>>>>             
>>>>>>>>> D1, D2 on details side. Fields M1 and D1 are required. I have a
>>>>>>>>> submit
>>>>>>>>> button that will submit all data and another submit button that will
>>>>>>>>> submit
>>>>>>>>> only detail data (I know it submits all the data, but then I will
>>>>>>>>> store
>>>>>>>>> the
>>>>>>>>> data on memory). When I click the button that submits my detail, I
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>> don't
>>>>>>
>>>>>>
>>>>>>             
>>>>>>>>> want it to do any validation on M1 field, but I want it to validate
>>>>>>>>> D1.
>>>>>>>>> Currently I am looking for 2 solutions:
>>>>>>>>> 1. Validate D1 but not M1
>>>>>>>>> 2. Do not validate at all.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> tx
>>>>>>>>>
>>>>>>>>> carlson
>>>>>>>>>
>>>>>>>>> Craig McIlwee escreveu:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>>>> See
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)<http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29>
>>>>>>
>>>>>>
>>>>>>             
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: carlson weber filho - Master CIM Informática
>>>>>>>>>> [mailto:cweber@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>> PM
>>>>>>
>>>>>>
>>>>>>             
>>>>>>>>>> To: users@wicket.apache.org
>>>>>>>>>> Subject: Bypassing form validation
>>>>>>>>>>
>>>>>>>>>> I have a form with two submit buttons. Is there any way to
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>> selectivelly
>>>>>>
>>>>>>
>>>>>>             
>>>>>>>>>> bypass some validation on one of these buttons? I want to validate
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>> just
>>>>>>
>>>>>>
>>>>>>             
>>>>>>>>>> two
>>>>>>>>>> fields if I click on the button1 and I want to validate all fields
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>> when
>>>>>>
>>>>>>
>>>>>>             
>>>>>>>>>> I
>>>>>>>>>> click on button2
>>>>>>>>>>
>>>>>>>>>> tx,
>>>>>>>>>>
>>>>>>>>>> carlson
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by Igor Vaynberg <ig...@gmail.com>.
M1.processInput();
if (M1.isValid()) { value=M1.getModelObject(); } else { handleerrror }

-igor

2009/7/23 carlson weber filho - Master CIM Informática
<cw...@mastercim.com.br>:
> Yes, I don't want to process it, but I want to do some processing based on
> the form values. But I got the point, If I don't validate form, I won't get
> my model updated. Now my problem goes back when I wanted to validate only
> parts of my values, so let's supose the folowing scenario
>
> Master Form
>  Field M1 - Required
>  Field M2 - Required
>  Field M3 - Required
>  Detail Form
>    Field D1 - Required
>    Field D2 - Required
>
> When I submit Field D1, Field M1 must be not blank. I am checking this now
> on code, not using a validator. I don't care at this time if Field M2 and
> Field M3 are blank or not. I need the value of M1 because I do some
> calculations on my detail object based on that. I tried using the
> getRawInput() but it only returns the value of my select (the M1 field is a
> select).
>
> Well, is there any solution for this case?
>
> tx
>
> carlson
>
>
> Igor Vaynberg escreveu:
>>
>> you said you do not want to process the outer form.
>>
>> without validation you cannot update the model. eg if you put "aa"
>> into an integer field how do we push that into an integer model? what
>> you can do is call formcomponent.getinput() to get at the raw values
>> of those components.
>>
>> -igor
>>
>>
>> 2009/7/23 carlson weber filho - Master CIM Informática
>> <cw...@mastercim.com.br>:
>>
>>>
>>> Well, I almost got what I want, but there's a problem. When I submit the
>>> inner form, on the onSubmit I want to check some values of the master
>>> form,
>>> and the model doesn't get updated... Any hints here?
>>>
>>> tx
>>> carlson
>>> Dane Laverty escreveu:
>>>
>>>>
>>>> This is sounding like a Chuck Norris joke -- "Wicket doesn't create
>>>> invalid
>>>> code -- it roundhouse kicks the rules until they submit!"
>>>>
>>>> On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson <
>>>> jeremy@wickettraining.com> wrote:
>>>>
>>>>
>>>>
>>>>>
>>>>> Wicket takes care of that for you - you can do it in Wicket.
>>>>>
>>>>> --
>>>>> Jeremy Thomerson
>>>>> http://www.wickettraining.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>>>> <cw...@mastercim.com.br>:
>>>>>
>>>>>
>>>>>>
>>>>>> Isn't invalid to nest forms inside forms?
>>>>>>
>>>>>> Igor Vaynberg escreveu:
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> you should use embedded forms.
>>>>>>>
>>>>>>> make a form for M1
>>>>>>>
>>>>>>> inside it add another form D1
>>>>>>>
>>>>>>> a button in D1 form will only process D1 form, a button in M1 form
>>>>>>> will process both.
>>>>>>>
>>>>>>> -igor
>>>>>>>
>>>>>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>>>>>> <cw...@mastercim.com.br>:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> I already tried using setDefaultFormProcessing, but I want to
>>>>>>>> actually
>>>>>>>> process the form without validating it, on one of these buttons but
>>>>>>>>
>>>>>>>>
>>>>>
>>>>> using
>>>>>
>>>>>
>>>>>>>>
>>>>>>>> this method, I can't update my data, . Let me explain better. I have
>>>>>>>> a
>>>>>>>> master-detail form, supose I have fields M1, M2 and M3 on
>>>>>>>> master-side
>>>>>>>>
>>>>>>>>
>>>>>
>>>>> and
>>>>>
>>>>>
>>>>>>>>
>>>>>>>> D1, D2 on details side. Fields M1 and D1 are required. I have a
>>>>>>>> submit
>>>>>>>> button that will submit all data and another submit button that will
>>>>>>>> submit
>>>>>>>> only detail data (I know it submits all the data, but then I will
>>>>>>>> store
>>>>>>>> the
>>>>>>>> data on memory). When I click the button that submits my detail, I
>>>>>>>>
>>>>>>>>
>>>>>
>>>>> don't
>>>>>
>>>>>
>>>>>>>>
>>>>>>>> want it to do any validation on M1 field, but I want it to validate
>>>>>>>> D1.
>>>>>>>> Currently I am looking for 2 solutions:
>>>>>>>> 1. Validate D1 but not M1
>>>>>>>> 2. Do not validate at all.
>>>>>>>>
>>>>>>>>
>>>>>>>> tx
>>>>>>>>
>>>>>>>> carlson
>>>>>>>>
>>>>>>>> Craig McIlwee escreveu:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> See
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>>>
>>>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)<http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29>
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: carlson weber filho - Master CIM Informática
>>>>>>>>> [mailto:cweber@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>>> PM
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> To: users@wicket.apache.org
>>>>>>>>> Subject: Bypassing form validation
>>>>>>>>>
>>>>>>>>> I have a form with two submit buttons. Is there any way to
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>>> selectivelly
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> bypass some validation on one of these buttons? I want to validate
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>>> just
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> two
>>>>>>>>> fields if I click on the button1 and I want to validate all fields
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>>> when
>>>>>
>>>>>
>>>>>>>>>
>>>>>>>>> I
>>>>>>>>> click on button2
>>>>>>>>>
>>>>>>>>> tx,
>>>>>>>>>
>>>>>>>>> carlson
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by carlson weber filho - Master CIM Informática <cw...@mastercim.com.br>.
Yes, I don't want to process it, but I want to do some processing based 
on the form values. But I got the point, If I don't validate form, I 
won't get my model updated. Now my problem goes back when I wanted to 
validate only parts of my values, so let's supose the folowing scenario

Master Form
  Field M1 - Required
  Field M2 - Required
  Field M3 - Required
  Detail Form
     Field D1 - Required
     Field D2 - Required

When I submit Field D1, Field M1 must be not blank. I am checking this 
now on code, not using a validator. I don't care at this time if Field 
M2 and Field M3 are blank or not. I need the value of M1 because I do 
some calculations on my detail object based on that. I tried using the 
getRawInput() but it only returns the value of my select (the M1 field 
is a select).

Well, is there any solution for this case?

tx

carlson


Igor Vaynberg escreveu:
> you said you do not want to process the outer form.
>
> without validation you cannot update the model. eg if you put "aa"
> into an integer field how do we push that into an integer model? what
> you can do is call formcomponent.getinput() to get at the raw values
> of those components.
>
> -igor
>
>
> 2009/7/23 carlson weber filho - Master CIM Informática
> <cw...@mastercim.com.br>:
>   
>> Well, I almost got what I want, but there's a problem. When I submit the
>> inner form, on the onSubmit I want to check some values of the master form,
>> and the model doesn't get updated... Any hints here?
>>
>> tx
>> carlson
>> Dane Laverty escreveu:
>>     
>>> This is sounding like a Chuck Norris joke -- "Wicket doesn't create
>>> invalid
>>> code -- it roundhouse kicks the rules until they submit!"
>>>
>>> On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson <
>>> jeremy@wickettraining.com> wrote:
>>>
>>>
>>>       
>>>> Wicket takes care of that for you - you can do it in Wicket.
>>>>
>>>> --
>>>> Jeremy Thomerson
>>>> http://www.wickettraining.com
>>>>
>>>>
>>>>
>>>>
>>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>>> <cw...@mastercim.com.br>:
>>>>
>>>>         
>>>>> Isn't invalid to nest forms inside forms?
>>>>>
>>>>> Igor Vaynberg escreveu:
>>>>>
>>>>>           
>>>>>> you should use embedded forms.
>>>>>>
>>>>>> make a form for M1
>>>>>>
>>>>>> inside it add another form D1
>>>>>>
>>>>>> a button in D1 form will only process D1 form, a button in M1 form
>>>>>> will process both.
>>>>>>
>>>>>> -igor
>>>>>>
>>>>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>>>>> <cw...@mastercim.com.br>:
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> I already tried using setDefaultFormProcessing, but I want to actually
>>>>>>> process the form without validating it, on one of these buttons but
>>>>>>>
>>>>>>>               
>>>> using
>>>>
>>>>         
>>>>>>> this method, I can't update my data, . Let me explain better. I have a
>>>>>>> master-detail form, supose I have fields M1, M2 and M3 on master-side
>>>>>>>
>>>>>>>               
>>>> and
>>>>
>>>>         
>>>>>>> D1, D2 on details side. Fields M1 and D1 are required. I have a submit
>>>>>>> button that will submit all data and another submit button that will
>>>>>>> submit
>>>>>>> only detail data (I know it submits all the data, but then I will
>>>>>>> store
>>>>>>> the
>>>>>>> data on memory). When I click the button that submits my detail, I
>>>>>>>
>>>>>>>               
>>>> don't
>>>>
>>>>         
>>>>>>> want it to do any validation on M1 field, but I want it to validate
>>>>>>> D1.
>>>>>>> Currently I am looking for 2 solutions:
>>>>>>> 1. Validate D1 but not M1
>>>>>>> 2. Do not validate at all.
>>>>>>>
>>>>>>>
>>>>>>> tx
>>>>>>>
>>>>>>> carlson
>>>>>>>
>>>>>>> Craig McIlwee escreveu:
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>>> See
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)<http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29>
>>>>
>>>>         
>>>>>>>> -----Original Message-----
>>>>>>>> From: carlson weber filho - Master CIM Informática
>>>>>>>> [mailto:cweber@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31
>>>>>>>>
>>>>>>>>                 
>>>> PM
>>>>
>>>>         
>>>>>>>> To: users@wicket.apache.org
>>>>>>>> Subject: Bypassing form validation
>>>>>>>>
>>>>>>>> I have a form with two submit buttons. Is there any way to
>>>>>>>>
>>>>>>>>                 
>>>> selectivelly
>>>>
>>>>         
>>>>>>>> bypass some validation on one of these buttons? I want to validate
>>>>>>>>
>>>>>>>>                 
>>>> just
>>>>
>>>>         
>>>>>>>> two
>>>>>>>> fields if I click on the button1 and I want to validate all fields
>>>>>>>>
>>>>>>>>                 
>>>> when
>>>>
>>>>         
>>>>>>>> I
>>>>>>>> click on button2
>>>>>>>>
>>>>>>>> tx,
>>>>>>>>
>>>>>>>> carlson
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>>         
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by Igor Vaynberg <ig...@gmail.com>.
you said you do not want to process the outer form.

without validation you cannot update the model. eg if you put "aa"
into an integer field how do we push that into an integer model? what
you can do is call formcomponent.getinput() to get at the raw values
of those components.

-igor


2009/7/23 carlson weber filho - Master CIM Informática
<cw...@mastercim.com.br>:
> Well, I almost got what I want, but there's a problem. When I submit the
> inner form, on the onSubmit I want to check some values of the master form,
> and the model doesn't get updated... Any hints here?
>
> tx
> carlson
> Dane Laverty escreveu:
>>
>> This is sounding like a Chuck Norris joke -- "Wicket doesn't create
>> invalid
>> code -- it roundhouse kicks the rules until they submit!"
>>
>> On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson <
>> jeremy@wickettraining.com> wrote:
>>
>>
>>>
>>> Wicket takes care of that for you - you can do it in Wicket.
>>>
>>> --
>>> Jeremy Thomerson
>>> http://www.wickettraining.com
>>>
>>>
>>>
>>>
>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>> <cw...@mastercim.com.br>:
>>>
>>>>
>>>> Isn't invalid to nest forms inside forms?
>>>>
>>>> Igor Vaynberg escreveu:
>>>>
>>>>>
>>>>> you should use embedded forms.
>>>>>
>>>>> make a form for M1
>>>>>
>>>>> inside it add another form D1
>>>>>
>>>>> a button in D1 form will only process D1 form, a button in M1 form
>>>>> will process both.
>>>>>
>>>>> -igor
>>>>>
>>>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>>>> <cw...@mastercim.com.br>:
>>>>>
>>>>>
>>>>>>
>>>>>> I already tried using setDefaultFormProcessing, but I want to actually
>>>>>> process the form without validating it, on one of these buttons but
>>>>>>
>>>
>>> using
>>>
>>>>>>
>>>>>> this method, I can't update my data, . Let me explain better. I have a
>>>>>> master-detail form, supose I have fields M1, M2 and M3 on master-side
>>>>>>
>>>
>>> and
>>>
>>>>>>
>>>>>> D1, D2 on details side. Fields M1 and D1 are required. I have a submit
>>>>>> button that will submit all data and another submit button that will
>>>>>> submit
>>>>>> only detail data (I know it submits all the data, but then I will
>>>>>> store
>>>>>> the
>>>>>> data on memory). When I click the button that submits my detail, I
>>>>>>
>>>
>>> don't
>>>
>>>>>>
>>>>>> want it to do any validation on M1 field, but I want it to validate
>>>>>> D1.
>>>>>> Currently I am looking for 2 solutions:
>>>>>> 1. Validate D1 but not M1
>>>>>> 2. Do not validate at all.
>>>>>>
>>>>>>
>>>>>> tx
>>>>>>
>>>>>> carlson
>>>>>>
>>>>>> Craig McIlwee escreveu:
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> See
>>>>>>>
>>>>>>>
>>>>>>>
>>>
>>>
>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)<http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29>
>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: carlson weber filho - Master CIM Informática
>>>>>>> [mailto:cweber@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31
>>>>>>>
>>>
>>> PM
>>>
>>>>>>>
>>>>>>> To: users@wicket.apache.org
>>>>>>> Subject: Bypassing form validation
>>>>>>>
>>>>>>> I have a form with two submit buttons. Is there any way to
>>>>>>>
>>>
>>> selectivelly
>>>
>>>>>>>
>>>>>>> bypass some validation on one of these buttons? I want to validate
>>>>>>>
>>>
>>> just
>>>
>>>>>>>
>>>>>>> two
>>>>>>> fields if I click on the button1 and I want to validate all fields
>>>>>>>
>>>
>>> when
>>>
>>>>>>>
>>>>>>> I
>>>>>>> click on button2
>>>>>>>
>>>>>>> tx,
>>>>>>>
>>>>>>> carlson
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by carlson weber filho - Master CIM Informática <cw...@mastercim.com.br>.
Well, I almost got what I want, but there's a problem. When I submit the 
inner form, on the onSubmit I want to check some values of the master 
form, and the model doesn't get updated... Any hints here?

tx
carlson
Dane Laverty escreveu:
> This is sounding like a Chuck Norris joke -- "Wicket doesn't create invalid
> code -- it roundhouse kicks the rules until they submit!"
>
> On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson <
> jeremy@wickettraining.com> wrote:
>
>   
>> Wicket takes care of that for you - you can do it in Wicket.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>>
>> 2009/7/23 carlson weber filho - Master CIM Informática
>> <cw...@mastercim.com.br>:
>>     
>>> Isn't invalid to nest forms inside forms?
>>>
>>> Igor Vaynberg escreveu:
>>>       
>>>> you should use embedded forms.
>>>>
>>>> make a form for M1
>>>>
>>>> inside it add another form D1
>>>>
>>>> a button in D1 form will only process D1 form, a button in M1 form
>>>> will process both.
>>>>
>>>> -igor
>>>>
>>>> 2009/7/23 carlson weber filho - Master CIM Informática
>>>> <cw...@mastercim.com.br>:
>>>>
>>>>         
>>>>> I already tried using setDefaultFormProcessing, but I want to actually
>>>>> process the form without validating it, on one of these buttons but
>>>>>           
>> using
>>     
>>>>> this method, I can't update my data, . Let me explain better. I have a
>>>>> master-detail form, supose I have fields M1, M2 and M3 on master-side
>>>>>           
>> and
>>     
>>>>> D1, D2 on details side. Fields M1 and D1 are required. I have a submit
>>>>> button that will submit all data and another submit button that will
>>>>> submit
>>>>> only detail data (I know it submits all the data, but then I will store
>>>>> the
>>>>> data on memory). When I click the button that submits my detail, I
>>>>>           
>> don't
>>     
>>>>> want it to do any validation on M1 field, but I want it to validate D1.
>>>>> Currently I am looking for 2 solutions:
>>>>> 1. Validate D1 but not M1
>>>>> 2. Do not validate at all.
>>>>>
>>>>>
>>>>> tx
>>>>>
>>>>> carlson
>>>>>
>>>>> Craig McIlwee escreveu:
>>>>>
>>>>>           
>>>>>> See
>>>>>>
>>>>>>
>>>>>>             
>> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)<http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29>
>>     
>>>>>> -----Original Message-----
>>>>>> From: carlson weber filho - Master CIM Informática
>>>>>> [mailto:cweber@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31
>>>>>>             
>> PM
>>     
>>>>>> To: users@wicket.apache.org
>>>>>> Subject: Bypassing form validation
>>>>>>
>>>>>> I have a form with two submit buttons. Is there any way to
>>>>>>             
>> selectivelly
>>     
>>>>>> bypass some validation on one of these buttons? I want to validate
>>>>>>             
>> just
>>     
>>>>>> two
>>>>>> fields if I click on the button1 and I want to validate all fields
>>>>>>             
>> when
>>     
>>>>>> I
>>>>>> click on button2
>>>>>>
>>>>>> tx,
>>>>>>
>>>>>> carlson
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by Dane Laverty <da...@gmail.com>.
This is sounding like a Chuck Norris joke -- "Wicket doesn't create invalid
code -- it roundhouse kicks the rules until they submit!"

On Thu, Jul 23, 2009 at 12:48 PM, Jeremy Thomerson <
jeremy@wickettraining.com> wrote:

> Wicket takes care of that for you - you can do it in Wicket.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> 2009/7/23 carlson weber filho - Master CIM Informática
> <cw...@mastercim.com.br>:
> > Isn't invalid to nest forms inside forms?
> >
> > Igor Vaynberg escreveu:
> >>
> >> you should use embedded forms.
> >>
> >> make a form for M1
> >>
> >> inside it add another form D1
> >>
> >> a button in D1 form will only process D1 form, a button in M1 form
> >> will process both.
> >>
> >> -igor
> >>
> >> 2009/7/23 carlson weber filho - Master CIM Informática
> >> <cw...@mastercim.com.br>:
> >>
> >>>
> >>> I already tried using setDefaultFormProcessing, but I want to actually
> >>> process the form without validating it, on one of these buttons but
> using
> >>> this method, I can't update my data, . Let me explain better. I have a
> >>> master-detail form, supose I have fields M1, M2 and M3 on master-side
> and
> >>> D1, D2 on details side. Fields M1 and D1 are required. I have a submit
> >>> button that will submit all data and another submit button that will
> >>> submit
> >>> only detail data (I know it submits all the data, but then I will store
> >>> the
> >>> data on memory). When I click the button that submits my detail, I
> don't
> >>> want it to do any validation on M1 field, but I want it to validate D1.
> >>> Currently I am looking for 2 solutions:
> >>> 1. Validate D1 but not M1
> >>> 2. Do not validate at all.
> >>>
> >>>
> >>> tx
> >>>
> >>> carlson
> >>>
> >>> Craig McIlwee escreveu:
> >>>
> >>>>
> >>>> See
> >>>>
> >>>>
> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)<http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing%28boolean%29>
> >>>>
> >>>> -----Original Message-----
> >>>> From: carlson weber filho - Master CIM Informática
> >>>> [mailto:cweber@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31
> PM
> >>>> To: users@wicket.apache.org
> >>>> Subject: Bypassing form validation
> >>>>
> >>>> I have a form with two submit buttons. Is there any way to
> selectivelly
> >>>> bypass some validation on one of these buttons? I want to validate
> just
> >>>> two
> >>>> fields if I click on the button1 and I want to validate all fields
> when
> >>>> I
> >>>> click on button2
> >>>>
> >>>> tx,
> >>>>
> >>>> carlson
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Bypassing form validation

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Wicket takes care of that for you - you can do it in Wicket.

--
Jeremy Thomerson
http://www.wickettraining.com




2009/7/23 carlson weber filho - Master CIM Informática
<cw...@mastercim.com.br>:
> Isn't invalid to nest forms inside forms?
>
> Igor Vaynberg escreveu:
>>
>> you should use embedded forms.
>>
>> make a form for M1
>>
>> inside it add another form D1
>>
>> a button in D1 form will only process D1 form, a button in M1 form
>> will process both.
>>
>> -igor
>>
>> 2009/7/23 carlson weber filho - Master CIM Informática
>> <cw...@mastercim.com.br>:
>>
>>>
>>> I already tried using setDefaultFormProcessing, but I want to actually
>>> process the form without validating it, on one of these buttons but using
>>> this method, I can't update my data, . Let me explain better. I have a
>>> master-detail form, supose I have fields M1, M2 and M3 on master-side and
>>> D1, D2 on details side. Fields M1 and D1 are required. I have a submit
>>> button that will submit all data and another submit button that will
>>> submit
>>> only detail data (I know it submits all the data, but then I will store
>>> the
>>> data on memory). When I click the button that submits my detail, I don't
>>> want it to do any validation on M1 field, but I want it to validate D1.
>>> Currently I am looking for 2 solutions:
>>> 1. Validate D1 but not M1
>>> 2. Do not validate at all.
>>>
>>>
>>> tx
>>>
>>> carlson
>>>
>>> Craig McIlwee escreveu:
>>>
>>>>
>>>> See
>>>>
>>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)
>>>>
>>>> -----Original Message-----
>>>> From: carlson weber filho - Master CIM Informática
>>>> [mailto:cweber@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM
>>>> To: users@wicket.apache.org
>>>> Subject: Bypassing form validation
>>>>
>>>> I have a form with two submit buttons. Is there any way to selectivelly
>>>> bypass some validation on one of these buttons? I want to validate just
>>>> two
>>>> fields if I click on the button1 and I want to validate all fields when
>>>> I
>>>> click on button2
>>>>
>>>> tx,
>>>>
>>>> carlson
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by carlson weber filho - Master CIM Informática <cw...@mastercim.com.br>.
Isn't invalid to nest forms inside forms?

Igor Vaynberg escreveu:
> you should use embedded forms.
>
> make a form for M1
>
> inside it add another form D1
>
> a button in D1 form will only process D1 form, a button in M1 form
> will process both.
>
> -igor
>
> 2009/7/23 carlson weber filho - Master CIM Informática
> <cw...@mastercim.com.br>:
>   
>> I already tried using setDefaultFormProcessing, but I want to actually
>> process the form without validating it, on one of these buttons but using
>> this method, I can't update my data, . Let me explain better. I have a
>> master-detail form, supose I have fields M1, M2 and M3 on master-side and
>> D1, D2 on details side. Fields M1 and D1 are required. I have a submit
>> button that will submit all data and another submit button that will submit
>> only detail data (I know it submits all the data, but then I will store the
>> data on memory). When I click the button that submits my detail, I don't
>> want it to do any validation on M1 field, but I want it to validate D1.
>> Currently I am looking for 2 solutions:
>> 1. Validate D1 but not M1
>> 2. Do not validate at all.
>>
>>
>> tx
>>
>> carlson
>>
>> Craig McIlwee escreveu:
>>     
>>> See
>>> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)
>>>
>>> -----Original Message-----
>>> From: carlson weber filho - Master CIM Informática
>>> [mailto:cweber@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM
>>> To: users@wicket.apache.org
>>> Subject: Bypassing form validation
>>>
>>> I have a form with two submit buttons. Is there any way to selectivelly
>>> bypass some validation on one of these buttons? I want to validate just two
>>> fields if I click on the button1 and I want to validate all fields when I
>>> click on button2
>>>
>>> tx,
>>>
>>> carlson
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by Igor Vaynberg <ig...@gmail.com>.
you should use embedded forms.

make a form for M1

inside it add another form D1

a button in D1 form will only process D1 form, a button in M1 form
will process both.

-igor

2009/7/23 carlson weber filho - Master CIM Informática
<cw...@mastercim.com.br>:
> I already tried using setDefaultFormProcessing, but I want to actually
> process the form without validating it, on one of these buttons but using
> this method, I can't update my data, . Let me explain better. I have a
> master-detail form, supose I have fields M1, M2 and M3 on master-side and
> D1, D2 on details side. Fields M1 and D1 are required. I have a submit
> button that will submit all data and another submit button that will submit
> only detail data (I know it submits all the data, but then I will store the
> data on memory). When I click the button that submits my detail, I don't
> want it to do any validation on M1 field, but I want it to validate D1.
> Currently I am looking for 2 solutions:
> 1. Validate D1 but not M1
> 2. Do not validate at all.
>
>
> tx
>
> carlson
>
> Craig McIlwee escreveu:
>>
>> See
>> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)
>>
>> -----Original Message-----
>> From: carlson weber filho - Master CIM Informática
>> [mailto:cweber@mastercim.com.br] Sent: Thursday, July 23, 2009 3:31 PM
>> To: users@wicket.apache.org
>> Subject: Bypassing form validation
>>
>> I have a form with two submit buttons. Is there any way to selectivelly
>> bypass some validation on one of these buttons? I want to validate just two
>> fields if I click on the button1 and I want to validate all fields when I
>> click on button2
>>
>> tx,
>>
>> carlson
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Bypassing form validation

Posted by carlson weber filho - Master CIM Informática <cw...@mastercim.com.br>.
I already tried using setDefaultFormProcessing, but I want to actually 
process the form without validating it, on one of these buttons but 
using this method, I can't update my data, . Let me explain better. I 
have a master-detail form, supose I have fields M1, M2 and M3 on 
master-side and D1, D2 on details side. Fields M1 and D1 are required. I 
have a submit button that will submit all data and another submit button 
that will submit only detail data (I know it submits all the data, but 
then I will store the data on memory). When I click the button that 
submits my detail, I don't want it to do any validation on M1 field, but 
I want it to validate D1. Currently I am looking for 2 solutions:
1. Validate D1 but not M1
2. Do not validate at all.


tx

carlson

Craig McIlwee escreveu:
> See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)
>
> -----Original Message-----
> From: carlson weber filho - Master CIM Informática [mailto:cweber@mastercim.com.br] 
> Sent: Thursday, July 23, 2009 3:31 PM
> To: users@wicket.apache.org
> Subject: Bypassing form validation
>
> I have a form with two submit buttons. Is there any way to selectivelly 
> bypass some validation on one of these buttons? I want to validate just 
> two fields if I click on the button1 and I want to validate all fields 
> when I click on button2
>
> tx,
>
> carlson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Bypassing form validation

Posted by Craig McIlwee <cr...@openroadsconsulting.com>.
See http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)

-----Original Message-----
From: carlson weber filho - Master CIM Informática [mailto:cweber@mastercim.com.br] 
Sent: Thursday, July 23, 2009 3:31 PM
To: users@wicket.apache.org
Subject: Bypassing form validation

I have a form with two submit buttons. Is there any way to selectivelly 
bypass some validation on one of these buttons? I want to validate just 
two fields if I click on the button1 and I want to validate all fields 
when I click on button2

tx,

carlson

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org