RE: validatewhen --- what's wrong?

2006-04-28 Thread Zheng Wen Zhe
Well, basically, I wanna the condition to be true only when user gives key
word 'password' to the password field.
And I tried this 
var-value(*this* == 'password')/var-value
The validwhen still always is true no matter what is given..


-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2006 18:34
To: Struts Users Mailing List
Subject: Re: validatewhen --- what's wrong?

Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password field.

 But, it doesn't work that way. Validation always passes no matter what the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN

   http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* == password/var-value

 /var



   /field

 /form

   /formset



 /form-validation






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: validatewhen --- what's wrong?

2006-04-28 Thread Chaudhary, Harsh
Are you sure that validation is being called? For example, what happens
when you submit the form with nothin in the login field (which is
required)?
Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 3:24 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


Well, basically, I wanna the condition to be true only when user gives
key
word 'password' to the password field.
And I tried this 
var-value(*this* == 'password')/var-value
The validwhen still always is true no matter what is given..


-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2006 18:34
To: Struts Users Mailing List
Subject: Re: validatewhen --- what's wrong?

Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with
property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password
field.

 But, it doesn't work that way. Validation always passes no matter what
the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN


http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password
depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* ==
password/var-value

 /var



   /field

 /form

   /formset



 /form-validation






-
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]



RE: validatewhen --- what's wrong?

2006-04-28 Thread Zheng Wen Zhe
The validation is definitely called. 
If I submit the form with login field empty, alert is popping up.
So I am sure is somewhere wrong with the validwhen..
But, where??

Jason
-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 16:04
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

Are you sure that validation is being called? For example, what happens
when you submit the form with nothin in the login field (which is
required)?
Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 3:24 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


Well, basically, I wanna the condition to be true only when user gives
key
word 'password' to the password field.
And I tried this 
var-value(*this* == 'password')/var-value
The validwhen still always is true no matter what is given..


-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2006 18:34
To: Struts Users Mailing List
Subject: Re: validatewhen --- what's wrong?

Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with
property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password
field.

 But, it doesn't work that way. Validation always passes no matter what
the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN


http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password
depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* ==
password/var-value

 /var



   /field

 /form

   /formset



 /form-validation






-
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]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: validatewhen --- what's wrong?

2006-04-28 Thread Zheng Wen Zhe
The scenario is validation always passes to success page as long as user
fills in two fields, no matter what you are put in.
So where could be the issue???
Jason


-Original Message-
From: Zheng Wen Zhe 
Sent: 28 April 2006 16:02
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?

The validation is definitely called. 
If I submit the form with login field empty, alert is popping up.
So I am sure is somewhere wrong with the validwhen..
But, where??

Jason
-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 16:04
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

Are you sure that validation is being called? For example, what happens
when you submit the form with nothin in the login field (which is
required)?
Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 3:24 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


Well, basically, I wanna the condition to be true only when user gives
key
word 'password' to the password field.
And I tried this 
var-value(*this* == 'password')/var-value
The validwhen still always is true no matter what is given..


-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2006 18:34
To: Struts Users Mailing List
Subject: Re: validatewhen --- what's wrong?

Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with
property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password
field.

 But, it doesn't work that way. Validation always passes no matter what
the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN


http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password
depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* ==
password/var-value

 /var



   /field

 /form

   /formset



 /form-validation






-
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]

-
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]



RE: validatewhen --- what's wrong?

2006-04-28 Thread Chaudhary, Harsh
Do you see some stack when validation runs for the password field?
Also, do you see this entry in your validator-rules.xml file:
  validator name=validwhen
?

Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 10:18 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


The scenario is validation always passes to success page as long as user
fills in two fields, no matter what you are put in.
So where could be the issue???
Jason


-Original Message-
From: Zheng Wen Zhe 
Sent: 28 April 2006 16:02
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?

The validation is definitely called. 
If I submit the form with login field empty, alert is popping up.
So I am sure is somewhere wrong with the validwhen..
But, where??

Jason
-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 16:04
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

Are you sure that validation is being called? For example, what happens
when you submit the form with nothin in the login field (which is
required)?
Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 3:24 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


Well, basically, I wanna the condition to be true only when user gives
key
word 'password' to the password field.
And I tried this 
var-value(*this* == 'password')/var-value
The validwhen still always is true no matter what is given..


-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2006 18:34
To: Struts Users Mailing List
Subject: Re: validatewhen --- what's wrong?

Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with
property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password
field.

 But, it doesn't work that way. Validation always passes no matter what
the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN


http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password
depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* ==
password/var-value

 /var



   /field

 /form

   /formset



 /form-validation






-
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]

-
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]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: validatewhen --- what's wrong?

2006-04-28 Thread Zheng Wen Zhe
This is the validwhen entry in validator-rules.xml 

*
validator name=validwhen
 classname=org.apache.struts.validator.validwhen.ValidWhen
 method=validateValidWhen
 methodParams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionMessages,
   org.apache.commons.validator.Validator,
   javax.servlet.http.HttpServletRequest
 msg=errors.required/
***


-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 17:09
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

Do you see some stack when validation runs for the password field?
Also, do you see this entry in your validator-rules.xml file:
  validator name=validwhen
?

Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 10:18 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


The scenario is validation always passes to success page as long as user
fills in two fields, no matter what you are put in.
So where could be the issue???
Jason


-Original Message-
From: Zheng Wen Zhe 
Sent: 28 April 2006 16:02
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?

The validation is definitely called. 
If I submit the form with login field empty, alert is popping up.
So I am sure is somewhere wrong with the validwhen..
But, where??

Jason
-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 16:04
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

Are you sure that validation is being called? For example, what happens
when you submit the form with nothin in the login field (which is
required)?
Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 3:24 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


Well, basically, I wanna the condition to be true only when user gives
key
word 'password' to the password field.
And I tried this 
var-value(*this* == 'password')/var-value
The validwhen still always is true no matter what is given..


-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2006 18:34
To: Struts Users Mailing List
Subject: Re: validatewhen --- what's wrong?

Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with
property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password
field.

 But, it doesn't work that way. Validation always passes no matter what
the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN


http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password
depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* ==
password/var-value

 /var



   /field

 /form

   /formset



 /form-validation






-
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]

-
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]

-
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]



RE: validatewhen --- what's wrong?

2006-04-28 Thread Chaudhary, Harsh
That looks good.

Do you see any exception stack related to validation when you submit the
form?

Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 11:07 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


This is the validwhen entry in validator-rules.xml 

*
validator name=validwhen
 
classname=org.apache.struts.validator.validwhen.ValidWhen
 method=validateValidWhen
 methodParams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionMessages,
   org.apache.commons.validator.Validator,
   javax.servlet.http.HttpServletRequest
 msg=errors.required/
***


-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 17:09
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

Do you see some stack when validation runs for the password field?
Also, do you see this entry in your validator-rules.xml file:
  validator name=validwhen
?

Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 10:18 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


The scenario is validation always passes to success page as long as user
fills in two fields, no matter what you are put in.
So where could be the issue???
Jason


-Original Message-
From: Zheng Wen Zhe 
Sent: 28 April 2006 16:02
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?

The validation is definitely called. 
If I submit the form with login field empty, alert is popping up.
So I am sure is somewhere wrong with the validwhen..
But, where??

Jason
-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 16:04
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

Are you sure that validation is being called? For example, what happens
when you submit the form with nothin in the login field (which is
required)?
Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 3:24 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


Well, basically, I wanna the condition to be true only when user gives
key
word 'password' to the password field.
And I tried this 
var-value(*this* == 'password')/var-value
The validwhen still always is true no matter what is given..


-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2006 18:34
To: Struts Users Mailing List
Subject: Re: validatewhen --- what's wrong?

Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with
property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password
field.

 But, it doesn't work that way. Validation always passes no matter what
the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN


http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password
depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* ==
password/var-value

 /var



   /field

 /form

   /formset



 /form-validation






-
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]

-
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

RE: validatewhen --- what's wrong?

2006-04-28 Thread Zheng Wen Zhe
I am not sure how to set Apache tomcat server to debug mode.
However, there are no exception been thrown out in console during validation
execution.

Jason

-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 17:19
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

That looks good.

Do you see any exception stack related to validation when you submit the
form?

Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 11:07 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


This is the validwhen entry in validator-rules.xml 

*
validator name=validwhen
 
classname=org.apache.struts.validator.validwhen.ValidWhen
 method=validateValidWhen
 methodParams=java.lang.Object,
   org.apache.commons.validator.ValidatorAction,
   org.apache.commons.validator.Field,
   org.apache.struts.action.ActionMessages,
   org.apache.commons.validator.Validator,
   javax.servlet.http.HttpServletRequest
 msg=errors.required/
***


-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 17:09
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

Do you see some stack when validation runs for the password field?
Also, do you see this entry in your validator-rules.xml file:
  validator name=validwhen
?

Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 10:18 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


The scenario is validation always passes to success page as long as user
fills in two fields, no matter what you are put in.
So where could be the issue???
Jason


-Original Message-
From: Zheng Wen Zhe 
Sent: 28 April 2006 16:02
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?

The validation is definitely called. 
If I submit the form with login field empty, alert is popping up.
So I am sure is somewhere wrong with the validwhen..
But, where??

Jason
-Original Message-
From: Chaudhary, Harsh [mailto:[EMAIL PROTECTED] 
Sent: 28 April 2006 16:04
To: Struts Users Mailing List
Subject: RE: validatewhen --- what's wrong?

Are you sure that validation is being called? For example, what happens
when you submit the form with nothin in the login field (which is
required)?
Harsh.

-Original Message-
From: Zheng Wen Zhe [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 3:24 AM
To: 'Struts Users Mailing List'
Subject: RE: validatewhen --- what's wrong?


Well, basically, I wanna the condition to be true only when user gives
key
word 'password' to the password field.
And I tried this 
var-value(*this* == 'password')/var-value
The validwhen still always is true no matter what is given..


-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2006 18:34
To: Struts Users Mailing List
Subject: Re: validatewhen --- what's wrong?

Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with
property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password
field.

 But, it doesn't work that way. Validation always passes no matter what
the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN


http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password
depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* ==
password/var-value

 /var



   /field

 /form

   /formset



 /form-validation






-
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

Re: validatewhen --- what's wrong?

2006-04-27 Thread Jakub Milkiewicz
Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password field.

 But, it doesn't work that way. Validation always passes no matter what the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN

   http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* == password/var-value

 /var



   /field

 /form

   /formset



 /form-validation







RE: validatewhen --- what's wrong?

2006-04-27 Thread Chaudhary, Harsh
Try it like this.
 var-value(*this* == 'password')/var-value

-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 12:34 PM
To: Struts Users Mailing List
Subject: Re: validatewhen --- what's wrong?


Hi
To tell you the truth i do not understand what you wanna do...
Anyway your validwhen condition is always true!
Note that you are comparing *this* - for property password,  with
property
password.
It means something like 1==1.



2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:

 Hey all,

 I wanna it say yes when a user type 'password' into this password
field.

 But, it doesn't work that way. Validation always passes no matter what
the
 user has given into the password field.

 Pls, someone tell what wrong with it!!!



 Validation.xml

 

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE form-validation PUBLIC

   -//Apache Software Foundation//DTD Commons Validator Rules
 Configuration 1.1.3//EN


http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

 form-validation

   formset

 form name=loginForm

   field property=login depends=required

 arg0 key=prompt.login /

   /field

   field property=password
depends=required,validwhen

 arg0 key=prompt.password /

 var

   var-nametest/var-name

   var-value*this* ==
password/var-value

 /var



   /field

 /form

   /formset



 /form-validation






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validatewhen --- what's wrong?

2006-04-27 Thread Jakub Milkiewicz
Right
This anlr gramma is quite not intuitive ...

2006/4/27, Chaudhary, Harsh [EMAIL PROTECTED]:

 Try it like this.
 var-value(*this* == 'password')/var-value

 -Original Message-
 From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 27, 2006 12:34 PM
 To: Struts Users Mailing List
 Subject: Re: validatewhen --- what's wrong?


 Hi
 To tell you the truth i do not understand what you wanna do...
 Anyway your validwhen condition is always true!
 Note that you are comparing *this* - for property password,  with
 property
 password.
 It means something like 1==1.



 2006/4/26, Zheng Wen Zhe [EMAIL PROTECTED]:
 
  Hey all,
 
  I wanna it say yes when a user type 'password' into this password
 field.
 
  But, it doesn't work that way. Validation always passes no matter what
 the
  user has given into the password field.
 
  Pls, someone tell what wrong with it!!!
 
 
 
  Validation.xml
 
  
 
  ?xml version=1.0 encoding=UTF-8?
 
  !DOCTYPE form-validation PUBLIC
 
-//Apache Software Foundation//DTD Commons Validator Rules
  Configuration 1.1.3//EN
 
 
 http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;
 
  form-validation
 
formset
 
  form name=loginForm
 
field property=login depends=required
 
  arg0 key=prompt.login /
 
/field
 
field property=password
 depends=required,validwhen
 
  arg0 key=prompt.password /
 
  var
 
var-nametest/var-name
 
var-value*this* ==
 password/var-value
 
  /var
 
 
 
/field
 
  /form
 
/formset
 
 
 
  /form-validation
 
 
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




validatewhen --- what's wrong?

2006-04-26 Thread Zheng Wen Zhe
Hey all,

I wanna it say yes when a user type 'password' into this password field.

But, it doesn't work that way. Validation always passes no matter what the
user has given into the password field.

Pls, someone tell what wrong with it!!!

 

Validation.xml 



?xml version=1.0 encoding=UTF-8?

!DOCTYPE form-validation PUBLIC

  -//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.1.3//EN

  http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd;

form-validation

  formset

form name=loginForm

  field property=login depends=required

arg0 key=prompt.login /

  /field

  field property=password depends=required,validwhen

arg0 key=prompt.password /

var

  var-nametest/var-name

  var-value*this* == password/var-value

/var

 

  /field

/form

  /formset

 

/form-validation