RE: [OT] Commons Validator JavaDoc

2002-09-26 Thread Jerry Jalenak

Cool!  This is exactly what I'm looking for!  

Jerry

 -Original Message-
 From: James Turner [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 6:50 PM
 To: Struts Users Mailing List
 Subject: Re: [OT] Commons Validator JavaDoc
 
 
 At 04:40 PM 9/25/2002, [EMAIL PROTECTED] wrote:
 
 Yeah, I have - it's a great example on how to write a custom 
 validation
 method.  I'm trying to see if I can directly access 
 additional form fields
 without having to specify each on as a var.../var in my
 application-rules.xml.
 
 Jerry
 
 
 Just added to validator, you can get access to the form from 
 a validation 
 rule by putting Validator in the method signature.  For example:
 
 
   public static boolean validateLastNameIsBob(Object bean,
Field field,
Validator validator) {
  Object form = validator.getResource(validator.BEAN_KEY);
  String lastName = ValidatorUtil.getValueAsString(form, 
 lastName);
  if (lastName.equals(Bob) return true;
  return false;
 }
 
 If you look in the unit tests for Validator, you can see a 
 requiredif 
 validation I wrote that does generic cross-field validations 
 (i.e., last 
 name is required if first name is filled in).  I'll be 
 submitting as an 
 enhancement for Struts Validator soon.
 
 James
 
 
 James
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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




[OT] Commons Validator JavaDoc

2002-09-25 Thread Jerry Jalenak

Does anyone have the URL for the Validator JavaDoc on jakarta.apache.org?

Jerry Jalenak
Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496
[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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




Re: [OT] Commons Validator JavaDoc

2002-09-25 Thread Dave Derry

I haven't managed to find any.


- Original Message -
From: Jerry Jalenak [EMAIL PROTECTED]


 Does anyone have the URL for the Validator JavaDoc on jakarta.apache.org?

 Jerry Jalenak
 Web Publishing
 LabOne, Inc.
 10101 Renner Blvd.
 Lenexa, KS  66219
 (913) 577-1496
 [EMAIL PROTECTED]


 This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.



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




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




RE: [OT] Commons Validator JavaDoc

2002-09-25 Thread James Mitchell

I can only find this...

http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-commons/validator/src/s
hare/org/apache/commons/validator/package.html?rev=1.1content-type=text/pla
in

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the Open Minded Developer Network
http://www.open-tools.org/struts-atlanta




 -Original Message-
 From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 1:13 PM
 To: '[EMAIL PROTECTED]'
 Subject: [OT] Commons Validator JavaDoc


 Does anyone have the URL for the Validator JavaDoc on jakarta.apache.org?

 Jerry Jalenak
 Web Publishing
 LabOne, Inc.
 10101 Renner Blvd.
 Lenexa, KS  66219
 (913) 577-1496
 [EMAIL PROTECTED]


 This transmission (and any information attached to it) may be
 confidential and is intended solely for the use of the individual
 or entity to which it is addressed. If you are not the intended
 recipient or the person responsible for delivering the
 transmission to the intended recipient, be advised that you have
 received this transmission in error and that any use,
 dissemination, forwarding, printing, or copying of this
 information is strictly prohibited. If you have received this
 transmission in error, please immediately notify LabOne at (800)388-4675.



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



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




RE: [OT] Commons Validator JavaDoc

2002-09-25 Thread Jerry Jalenak

Thanks.  Not quite what I'm looking for...

I need to find the javadoc for the methods used by the 'field' class.  I'm
hoping there is a way to access other form fields other than the one being
validated.  I've got a situation where I only need to validate required
fields IF a checkbox is selected; otherwise, I don't care

Jerry

 -Original Message-
 From: James Mitchell [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 12:48 PM
 To: Struts Users Mailing List
 Subject: RE: [OT] Commons Validator JavaDoc
 
 
 I can only find this...
 
 http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-commons/v
 alidator/src/s
 hare/org/apache/commons/validator/package.html?rev=1.1content
 -type=text/pla
 in
 
 James Mitchell
 Software Engineer\Struts Evangelist
 Struts-Atlanta, the Open Minded Developer Network
 http://www.open-tools.org/struts-atlanta
 
 
 
 
  -Original Message-
  From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, September 25, 2002 1:13 PM
  To: '[EMAIL PROTECTED]'
  Subject: [OT] Commons Validator JavaDoc
 
 
  Does anyone have the URL for the Validator JavaDoc on 
 jakarta.apache.org?
 
  Jerry Jalenak
  Web Publishing
  LabOne, Inc.
  10101 Renner Blvd.
  Lenexa, KS  66219
  (913) 577-1496
  [EMAIL PROTECTED]
 
 
  This transmission (and any information attached to it) may be
  confidential and is intended solely for the use of the individual
  or entity to which it is addressed. If you are not the intended
  recipient or the person responsible for delivering the
  transmission to the intended recipient, be advised that you have
  received this transmission in error and that any use,
  dissemination, forwarding, printing, or copying of this
  information is strictly prohibited. If you have received this
  transmission in error, please immediately notify LabOne at 
 (800)388-4675.
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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




Re: [OT] Commons Validator JavaDoc

2002-09-25 Thread Dave Derry

Jerry,

Did you see this?
http://home.earthlink.net/~dwinterfeldt/overview.html#comparingTwoFields
This helped me in writing a validator to check that one entered date was
later than another entered date.

Dave Derry


- Original Message -
From: Jerry Jalenak [EMAIL PROTECTED]


 Thanks.  Not quite what I'm looking for...

 I need to find the javadoc for the methods used by the 'field' class.  I'm
 hoping there is a way to access other form fields other than the one being
 validated.  I've got a situation where I only need to validate required
 fields IF a checkbox is selected; otherwise, I don't care

 Jerry




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




RE: [OT] Commons Validator JavaDoc

2002-09-25 Thread Jerry Jalenak

Yeah, I have - it's a great example on how to write a custom validation
method.  I'm trying to see if I can directly access additional form fields
without having to specify each on as a var.../var in my
application-rules.xml.  

Jerry

 -Original Message-
 From: Dave Derry [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 1:39 PM
 To: Struts Users Mailing List
 Subject: Re: [OT] Commons Validator JavaDoc
 
 
 Jerry,
 
 Did you see this?
 http://home.earthlink.net/~dwinterfeldt/overview.html#comparin
 gTwoFields
 This helped me in writing a validator to check that one 
 entered date was
 later than another entered date.
 
 Dave Derry
 
 
 - Original Message -
 From: Jerry Jalenak [EMAIL PROTECTED]
 
 
  Thanks.  Not quite what I'm looking for...
 
  I need to find the javadoc for the methods used by the 
 'field' class.  I'm
  hoping there is a way to access other form fields other 
 than the one being
  validated.  I've got a situation where I only need to 
 validate required
  fields IF a checkbox is selected; otherwise, I don't care
 
  Jerry
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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




Re: [OT] Commons Validator JavaDoc

2002-09-25 Thread Dave Derry

So are you wanting to do validation that involves more than two fields? Or
just trying to get away from specifying the otehr field(s) as var
elements.

I can't see any way to do that other than having a validator that is
specific to a particular form fieldso that it knows the other fields
that aree involved. The drawback to that is that you would have to write one
for each field to be validated!

Dave D

- Original Message -
From: Jerry Jalenak [EMAIL PROTECTED]


 Yeah, I have - it's a great example on how to write a custom validation
 method.  I'm trying to see if I can directly access additional form fields
 without having to specify each on as a var.../var in my
 application-rules.xml.

 Jerry

  -Original Message-
  From: Dave Derry [mailto:[EMAIL PROTECTED]]
 
  Jerry,
 
  Did you see this?
  http://home.earthlink.net/~dwinterfeldt/overview.html#comparin
  gTwoFields
  This helped me in writing a validator to check that one
  entered date was
  later than another entered date.
 
  Dave Derry
 
 
  - Original Message -
  From: Jerry Jalenak [EMAIL PROTECTED]
 
 
   Thanks.  Not quite what I'm looking for...
  
   I need to find the javadoc for the methods used by the
  'field' class.  I'm
   hoping there is a way to access other form fields other
  than the one being
   validated.  I've got a situation where I only need to
  validate required
   fields IF a checkbox is selected; otherwise, I don't care
  
   Jerry
  
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 

 This transmission (and any information attached to it) may be confidential
and is intended solely for the use of the individual or entity to which it
is addressed. If you are not the intended recipient or the person
responsible for delivering the transmission to the intended recipient, be
advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is
strictly prohibited. If you have received this transmission in error, please
immediately notify LabOne at (800)388-4675.



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




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




Re: [OT] Commons Validator JavaDoc

2002-09-25 Thread James Turner

At 02:07 PM 9/25/2002, [EMAIL PROTECTED] wrote:
Does anyone have the URL for the Validator JavaDoc on jakarta.apache.org?

On the todo list for the proposed Validator 1.0 release is a lot more 
documentation, included JavaDoc.

I'm hoping to have 1.0 ready for 1 November, assuming the release plan is 
approved.

James



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




RE: [OT] Commons Validator JavaDoc

2002-09-25 Thread Jerry Jalenak

That's the same conclusion that I've come to.  The situation is thus - if a
user clicks a checkbox 'on', then I need to validate as many as three other
fields that are under the checkbox, otherwise I don't care.  The approach
I'm taking is to write a validation method for each checkbox, passing the
other fields in as var's.  In the validation method I can check to see if
the checkbox is 'on' - if it is then I can check the other fields.  Ugly,
but I think it will work (unless someone else has a better idea! :-))

On an aside (and thank you James for the doc update), does anyone know where
the getActionError method that used to be in ValidatorUtils got moved to?  I
can't seem to find it anyplace under commons.Validator.

Jerry

 -Original Message-
 From: Dave Derry [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 2:12 PM
 To: Struts Users Mailing List
 Subject: Re: [OT] Commons Validator JavaDoc
 
 
 So are you wanting to do validation that involves more than 
 two fields? Or
 just trying to get away from specifying the otehr field(s) as var
 elements.
 
 I can't see any way to do that other than having a validator that is
 specific to a particular form fieldso that it knows the 
 other fields
 that aree involved. The drawback to that is that you would 
 have to write one
 for each field to be validated!
 
 Dave D
 
 - Original Message -
 From: Jerry Jalenak [EMAIL PROTECTED]
 
 
  Yeah, I have - it's a great example on how to write a 
 custom validation
  method.  I'm trying to see if I can directly access 
 additional form fields
  without having to specify each on as a var.../var in my
  application-rules.xml.
 
  Jerry
 
   -Original Message-
   From: Dave Derry [mailto:[EMAIL PROTECTED]]
  
   Jerry,
  
   Did you see this?
   http://home.earthlink.net/~dwinterfeldt/overview.html#comparin
   gTwoFields
   This helped me in writing a validator to check that one
   entered date was
   later than another entered date.
  
   Dave Derry
  
  
   - Original Message -
   From: Jerry Jalenak [EMAIL PROTECTED]
  
  
Thanks.  Not quite what I'm looking for...
   
I need to find the javadoc for the methods used by the
   'field' class.  I'm
hoping there is a way to access other form fields other
   than the one being
validated.  I've got a situation where I only need to
   validate required
fields IF a checkbox is selected; otherwise, I don't care
   
Jerry
   
  
  
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
  
 
  This transmission (and any information attached to it) may 
 be confidential
 and is intended solely for the use of the individual or 
 entity to which it
 is addressed. If you are not the intended recipient or the person
 responsible for delivering the transmission to the intended 
 recipient, be
 advised that you have received this transmission in error and 
 that any use,
 dissemination, forwarding, printing, or copying of this information is
 strictly prohibited. If you have received this transmission 
 in error, please
 immediately notify LabOne at (800)388-4675.
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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




RE: [OT] Commons Validator JavaDoc

2002-09-25 Thread Jerry Jalenak

Never mind - found it under StrutsValidatorUtil

Jerry

 -Original Message-
 From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 25, 2002 2:25 PM
 To: 'Struts Users Mailing List'
 Subject: RE: [OT] Commons Validator JavaDoc
 
 
 That's the same conclusion that I've come to.  The situation 
 is thus - if a
 user clicks a checkbox 'on', then I need to validate as many 
 as three other
 fields that are under the checkbox, otherwise I don't care.  
 The approach
 I'm taking is to write a validation method for each checkbox, 
 passing the
 other fields in as var's.  In the validation method I can 
 check to see if
 the checkbox is 'on' - if it is then I can check the other 
 fields.  Ugly,
 but I think it will work (unless someone else has a better idea! :-))
 
 On an aside (and thank you James for the doc update), does 
 anyone know where
 the getActionError method that used to be in ValidatorUtils 
 got moved to?  I
 can't seem to find it anyplace under commons.Validator.
 
 Jerry
 
  -Original Message-
  From: Dave Derry [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, September 25, 2002 2:12 PM
  To: Struts Users Mailing List
  Subject: Re: [OT] Commons Validator JavaDoc
  
  
  So are you wanting to do validation that involves more than 
  two fields? Or
  just trying to get away from specifying the otehr field(s) as var
  elements.
  
  I can't see any way to do that other than having a validator that is
  specific to a particular form fieldso that it knows the 
  other fields
  that aree involved. The drawback to that is that you would 
  have to write one
  for each field to be validated!
  
  Dave D
  
  - Original Message -
  From: Jerry Jalenak [EMAIL PROTECTED]
  
  
   Yeah, I have - it's a great example on how to write a 
  custom validation
   method.  I'm trying to see if I can directly access 
  additional form fields
   without having to specify each on as a var.../var in my
   application-rules.xml.
  
   Jerry
  
-Original Message-
From: Dave Derry [mailto:[EMAIL PROTECTED]]
   
Jerry,
   
Did you see this?
http://home.earthlink.net/~dwinterfeldt/overview.html#comparin
gTwoFields
This helped me in writing a validator to check that one
entered date was
later than another entered date.
   
Dave Derry
   
   
- Original Message -
From: Jerry Jalenak [EMAIL PROTECTED]
   
   
 Thanks.  Not quite what I'm looking for...

 I need to find the javadoc for the methods used by the
'field' class.  I'm
 hoping there is a way to access other form fields other
than the one being
 validated.  I've got a situation where I only need to
validate required
 fields IF a checkbox is selected; otherwise, I don't care

 Jerry

   
   
   
--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
   
   
  
   This transmission (and any information attached to it) may 
  be confidential
  and is intended solely for the use of the individual or 
  entity to which it
  is addressed. If you are not the intended recipient or the person
  responsible for delivering the transmission to the intended 
  recipient, be
  advised that you have received this transmission in error and 
  that any use,
  dissemination, forwarding, printing, or copying of this 
 information is
  strictly prohibited. If you have received this transmission 
  in error, please
  immediately notify LabOne at (800)388-4675.
  
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
 
 This transmission (and any information attached to it) may be 
 confidential and is intended solely for the use of the 
 individual or entity to which it is addressed. If you are not 
 the intended recipient or the person responsible for 
 delivering the transmission to the intended recipient, be 
 advised that you have received this transmission in error and 
 that any use, dissemination, forwarding, printing, or copying 
 of this information is strictly prohibited. If you have 
 received this transmission in error, please immediately 
 notify LabOne at (800)388-4675.
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying

Re: [OT] Commons Validator JavaDoc

2002-09-25 Thread James Turner

At 04:40 PM 9/25/2002, [EMAIL PROTECTED] wrote:

Yeah, I have - it's a great example on how to write a custom validation
method.  I'm trying to see if I can directly access additional form fields
without having to specify each on as a var.../var in my
application-rules.xml.

Jerry


Just added to validator, you can get access to the form from a validation 
rule by putting Validator in the method signature.  For example:


  public static boolean validateLastNameIsBob(Object bean,
   Field field,
   Validator validator) {
 Object form = validator.getResource(validator.BEAN_KEY);
 String lastName = ValidatorUtil.getValueAsString(form, lastName);
 if (lastName.equals(Bob) return true;
 return false;
}

If you look in the unit tests for Validator, you can see a requiredif 
validation I wrote that does generic cross-field validations (i.e., last 
name is required if first name is filled in).  I'll be submitting as an 
enhancement for Struts Validator soon.

James


James




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