You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vitaly Tsaplin <vi...@gmail.com> on 2008/02/27 23:33:56 UTC

Turning on and off a validation of a particular component depending on its value or values of other form components

   Hi users!

   Next question from newbie's series. :)
   I have a password field but since I am doing an account update, I
am not going to enforce user to change his/her password. So in this
case I mark both a password & a confirmation fields as optional
(required = false). But in case if an entered password is not empty it
appears that the user has an intension to change it and it means that
I should perform a usual validation step (password & conformation
required and should be equal). So my question is... in which method I
can check the presence of a password and turn on a validation back
before the actual validation will happen?

   Best regards,
   Vitaly

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


Re: Turning on and off a validation of a particular component depending on its value or values of other form components

Posted by Igor Vaynberg <ig...@gmail.com>.
you can add an ivalidator, thats exactly what they are for....

-igor

On Wed, Feb 27, 2008 at 3:11 PM, Vitaly Tsaplin
<vi...@gmail.com> wrote:
> Wow! That's great!
>  But still... in general... is there any way to set up a validation
>  rule just before the actual validation and after a conversion?
>
>
>
>  On Wed, Feb 27, 2008 at 11:59 PM, Igor Vaynberg <ig...@gmail.com> wrote:
>  > why conditionally? if they are both null the check will still pass....
>  >
>  >  -igor
>  >
>  >
>  >  On Wed, Feb 27, 2008 at 2:57 PM, Vitaly Tsaplin
>  >
>  >
>  > <vi...@gmail.com> wrote:
>  >  > I am using it. But I was going to attach it conditionally...
>  >  >
>  >  >
>  >  >
>  >  >  On Wed, Feb 27, 2008 at 11:44 PM, Igor Vaynberg <ig...@gmail.com> wrote:
>  >  >  > have you seen EqualPasswordValidator?
>  >  >  >
>  >  >  >  -igor
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >  On Wed, Feb 27, 2008 at 2:33 PM, Vitaly Tsaplin
>  >  >  >  <vi...@gmail.com> wrote:
>  >  >  >  >    Hi users!
>  >  >  >  >
>  >  >  >  >    Next question from newbie's series. :)
>  >  >  >  >    I have a password field but since I am doing an account update, I
>  >  >  >  >  am not going to enforce user to change his/her password. So in this
>  >  >  >  >  case I mark both a password & a confirmation fields as optional
>  >  >  >  >  (required = false). But in case if an entered password is not empty it
>  >  >  >  >  appears that the user has an intension to change it and it means that
>  >  >  >  >  I should perform a usual validation step (password & conformation
>  >  >  >  >  required and should be equal). So my question is... in which method I
>  >  >  >  >  can check the presence of a password and turn on a validation back
>  >  >  >  >  before the actual validation will happen?
>  >  >  >  >
>  >  >  >  >    Best regards,
>  >  >  >  >    Vitaly
>  >  >  >  >
>  >  >  >  >  ---------------------------------------------------------------------
>  >  >  >  >  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: Turning on and off a validation of a particular component depending on its value or values of other form components

Posted by Vitaly Tsaplin <vi...@gmail.com>.
Wow! That's great!
But still... in general... is there any way to set up a validation
rule just before the actual validation and after a conversion?

On Wed, Feb 27, 2008 at 11:59 PM, Igor Vaynberg <ig...@gmail.com> wrote:
> why conditionally? if they are both null the check will still pass....
>
>  -igor
>
>
>  On Wed, Feb 27, 2008 at 2:57 PM, Vitaly Tsaplin
>
>
> <vi...@gmail.com> wrote:
>  > I am using it. But I was going to attach it conditionally...
>  >
>  >
>  >
>  >  On Wed, Feb 27, 2008 at 11:44 PM, Igor Vaynberg <ig...@gmail.com> wrote:
>  >  > have you seen EqualPasswordValidator?
>  >  >
>  >  >  -igor
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >  On Wed, Feb 27, 2008 at 2:33 PM, Vitaly Tsaplin
>  >  >  <vi...@gmail.com> wrote:
>  >  >  >    Hi users!
>  >  >  >
>  >  >  >    Next question from newbie's series. :)
>  >  >  >    I have a password field but since I am doing an account update, I
>  >  >  >  am not going to enforce user to change his/her password. So in this
>  >  >  >  case I mark both a password & a confirmation fields as optional
>  >  >  >  (required = false). But in case if an entered password is not empty it
>  >  >  >  appears that the user has an intension to change it and it means that
>  >  >  >  I should perform a usual validation step (password & conformation
>  >  >  >  required and should be equal). So my question is... in which method I
>  >  >  >  can check the presence of a password and turn on a validation back
>  >  >  >  before the actual validation will happen?
>  >  >  >
>  >  >  >    Best regards,
>  >  >  >    Vitaly
>  >  >  >
>  >  >  >  ---------------------------------------------------------------------
>  >  >  >  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: Turning on and off a validation of a particular component depending on its value or values of other form components

Posted by Igor Vaynberg <ig...@gmail.com>.
why conditionally? if they are both null the check will still pass....

-igor


On Wed, Feb 27, 2008 at 2:57 PM, Vitaly Tsaplin
<vi...@gmail.com> wrote:
> I am using it. But I was going to attach it conditionally...
>
>
>
>  On Wed, Feb 27, 2008 at 11:44 PM, Igor Vaynberg <ig...@gmail.com> wrote:
>  > have you seen EqualPasswordValidator?
>  >
>  >  -igor
>  >
>  >
>  >
>  >
>  >  On Wed, Feb 27, 2008 at 2:33 PM, Vitaly Tsaplin
>  >  <vi...@gmail.com> wrote:
>  >  >    Hi users!
>  >  >
>  >  >    Next question from newbie's series. :)
>  >  >    I have a password field but since I am doing an account update, I
>  >  >  am not going to enforce user to change his/her password. So in this
>  >  >  case I mark both a password & a confirmation fields as optional
>  >  >  (required = false). But in case if an entered password is not empty it
>  >  >  appears that the user has an intension to change it and it means that
>  >  >  I should perform a usual validation step (password & conformation
>  >  >  required and should be equal). So my question is... in which method I
>  >  >  can check the presence of a password and turn on a validation back
>  >  >  before the actual validation will happen?
>  >  >
>  >  >    Best regards,
>  >  >    Vitaly
>  >  >
>  >  >  ---------------------------------------------------------------------
>  >  >  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: Turning on and off a validation of a particular component depending on its value or values of other form components

Posted by Vitaly Tsaplin <vi...@gmail.com>.
I am using it. But I was going to attach it conditionally...

On Wed, Feb 27, 2008 at 11:44 PM, Igor Vaynberg <ig...@gmail.com> wrote:
> have you seen EqualPasswordValidator?
>
>  -igor
>
>
>
>
>  On Wed, Feb 27, 2008 at 2:33 PM, Vitaly Tsaplin
>  <vi...@gmail.com> wrote:
>  >    Hi users!
>  >
>  >    Next question from newbie's series. :)
>  >    I have a password field but since I am doing an account update, I
>  >  am not going to enforce user to change his/her password. So in this
>  >  case I mark both a password & a confirmation fields as optional
>  >  (required = false). But in case if an entered password is not empty it
>  >  appears that the user has an intension to change it and it means that
>  >  I should perform a usual validation step (password & conformation
>  >  required and should be equal). So my question is... in which method I
>  >  can check the presence of a password and turn on a validation back
>  >  before the actual validation will happen?
>  >
>  >    Best regards,
>  >    Vitaly
>  >
>  >  ---------------------------------------------------------------------
>  >  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: Turning on and off a validation of a particular component depending on its value or values of other form components

Posted by Igor Vaynberg <ig...@gmail.com>.
have you seen EqualPasswordValidator?

-igor


On Wed, Feb 27, 2008 at 2:33 PM, Vitaly Tsaplin
<vi...@gmail.com> wrote:
>    Hi users!
>
>    Next question from newbie's series. :)
>    I have a password field but since I am doing an account update, I
>  am not going to enforce user to change his/her password. So in this
>  case I mark both a password & a confirmation fields as optional
>  (required = false). But in case if an entered password is not empty it
>  appears that the user has an intension to change it and it means that
>  I should perform a usual validation step (password & conformation
>  required and should be equal). So my question is... in which method I
>  can check the presence of a password and turn on a validation back
>  before the actual validation will happen?
>
>    Best regards,
>    Vitaly
>
>  ---------------------------------------------------------------------
>  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