RE: requiredif help?

2006-10-10 Thread Strachan, Paul
try: ((lunchBreak == null) or (*this* != null))

above may work better for checkboxes which do not submit a value when
unchecked...

Some handy points about validwhen:
1. use it in place of "required"
2. I often come up with a "invalidwhen" logic and then reverse it for
"validwhen"

e.g. 
1. lunch from is invalid if:  (lunchFrom == null and lunchbreak != null)

now turn it around...

2. lunch from is valid if:  (lunchFrom != null or lunchbreak == null)

Hope that helps
Paul

-Original Message-
From: Strachan, Paul [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 10 October 2006 4:58 PM
To: Struts Users Mailing List
Subject: RE: requiredif help?

try using validwhen - something like:


  
  
test
((lunchBreak == 'N') or (*this* != null))
  



  
  
test
((lunchBreak == 'N') or (*this* != null))
  



-Original Message-
From: Mallik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 10 October 2006 4:49 PM
To: user@struts.apache.org
Subject: requiredif help?


HI friends 
In my form, i have to validate two fields,if another check box is not
selected, 

means if the user checked no lunch break,lunch from and lunch to are not
required,else both are monadatory. 

i hope requiredif suits for this, if so, give me some sample code or any
artical for this 

or is there any better solution for this,help for that 

ur's
Mallik


-- 
View this message in context:
http://www.nabble.com/requiredif-help--tf2414782.html#a6731043
Sent from the Struts - User mailing list archive at Nabble.com.


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

**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**

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

**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**

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



RE: requiredif help?

2006-10-10 Thread Mallik

HI friend
thanks for help
 i go through it but it is not working right
this is my code snipet
validation.xml
-



test
(noLunch == 'Y')





test
(noLunch == 'Y')


--
this jsp code snipet
---
 
*




Select

1

2

3

4

5

6






check
  
  






Select

11:00

11:05

11:10

11:15

11:20

11:25

11:30

11:35

11:40

11:45

11:50

11:55

12:00

12:05

12:10

12:15

12:20

12:25

12:30

12:35

12:40

12:45

12:50

12:55
 

RE: requiredif help?

2006-10-10 Thread Mallik

Thank you friend
no i got some idea, i hope it will work
ur's
Mallik

-- 
View this message in context: 
http://www.nabble.com/requiredif-help--tf2414782.html#a6731806
Sent from the Struts - User mailing list archive at Nabble.com.


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



RE: requiredif help?

2006-10-09 Thread Strachan, Paul
try using validwhen - something like:


  
  
test
((lunchBreak == 'N') or (*this* != null))
  



  
  
test
((lunchBreak == 'N') or (*this* != null))
  





-Original Message-
From: Mallik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 10 October 2006 4:49 PM
To: user@struts.apache.org
Subject: requiredif help?


HI friends 
In my form, i have to validate two fields,if another check box is not
selected, 

means if the user checked no lunch break,lunch from and lunch to are not
required,else both are monadatory. 

i hope requiredif suits for this, if so, give me some sample code or any
artical for this 

or is there any better solution for this,help for that 

ur's
Mallik


-- 
View this message in context:
http://www.nabble.com/requiredif-help--tf2414782.html#a6731043
Sent from the Struts - User mailing list archive at Nabble.com.


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

**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**

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