RE: Re: Validation only occurs client side

2005-03-25 Thread tarek.nabil
Thanks Bill. Actually, I had tried that by overriding validate in my
form, calling super.validate() and checking the return value. I found
that validate in the parent class ValidatorForm returns an empty
ActionErrors object. So, that means the form is passing the validation,
which is really strange! Do you think the request processor might have
something to do with that?

-Original Message-
From: Bill Siggelkow [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 24, 2005 4:30 AM
To: user@struts.apache.org
Subject: Re: Validation only occurs client side

At first glance it looks okay -- I suggest you set a breakpoint in the
ValidatorForm.validate() method (or you could override the method) to
see if it gets called. If not, then I would look into your request
processor (which I noticed was a custom one).

-Bill Siggelkow

On 2005-03-23 11:09:06 -0500, tarek.nabil [EMAIL PROTECTED] said:

 Hi,
 
 I'm having a really weird problem. This is the first time I use the 
 Validator. I expected to have some problems with client side 
 validations, but what I found was client side validations are working 
 but server side validations aren't!!
 
 The fact that client-side validations work, I think, means that I've 
 done the configuration correctly. But why isn't it doing anything on 
 the server side?!!!
 
 I made sure that validate is set to true on my action tags. I double 
 checked everything else and I believe everything is done correctly. 
 Any ideas?
 
 validator-rules.xml -- the default
 
 validation.xml has only a single formset element
 
formset
 
   formname=applicantForm
  fieldproperty=applicantId
  depends=required
  /field
  fieldproperty=nameA
  depends=required
  /field
   /form
  /formset
 
 struts-config.xml
 
   form-beans
 form-bean name=applicantForm
 type=ae.gov.dphq.traffic.eng.actions.ApplicantForm/
   /form-beans
   action-mappings
 action path=/applicant type=some.package.ApplicantAction
 name=applicantForm input=/tps/applicant.jsp scope=request
 validate=true
   forward name=search path=/applicantSearch.do/
   forward name=add path=/applicantAdd.do/
   forward name=update path=/applicantUpdate.do/
   forward name=delete path=/applicantDelete.do/
 /action
   /action-mappings
   controller
 processorClass=oracle.jbo.html.struts11.BC4JRequestProcessor
 contentType=text/html;charset=windows-1256/
   message-resources
 parameter=ae.gov.dphq.traffic.eng.ApplicationResources/
   plug-in className=org.apache.struts.validator.ValidatorPlugIn
 set-property property=pathnames
 value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/
   /plug-in
 I don't have any validate methods in my ApplicantForm class which 
 extends ValidatorForm.
 
 Every help is appreciated.





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



Validation only occurs client side

2005-03-23 Thread tarek.nabil
Hi,

I'm having a really weird problem. This is the first time I use the
Validator. I expected to have some problems with client side
validations, but what I found was client side validations are working
but server side validations aren't!!

The fact that client-side validations work, I think, means that I've
done the configuration correctly. But why isn't it doing anything on the
server side?!!!

I made sure that validate is set to true on my action tags. I double
checked everything else and I believe everything is done correctly. Any
ideas?

validator-rules.xml -- the default

validation.xml has only a single formset element

   formset

  formname=applicantForm
 fieldproperty=applicantId
   depends=required
 /field
 fieldproperty=nameA
   depends=required
 /field
  /form
  
   /formset

struts-config.xml

  form-beans
form-bean name=applicantForm
type=ae.gov.dphq.traffic.eng.actions.ApplicantForm/
  /form-beans
  action-mappings
action path=/applicant type=some.package.ApplicantAction
name=applicantForm input=/tps/applicant.jsp scope=request
validate=true
  forward name=search path=/applicantSearch.do/
  forward name=add path=/applicantAdd.do/
  forward name=update path=/applicantUpdate.do/
  forward name=delete path=/applicantDelete.do/
/action
  /action-mappings
  controller
processorClass=oracle.jbo.html.struts11.BC4JRequestProcessor
contentType=text/html;charset=windows-1256/
  message-resources
parameter=ae.gov.dphq.traffic.eng.ApplicationResources/
  plug-in className=org.apache.struts.validator.ValidatorPlugIn
set-property property=pathnames
value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/
  /plug-in  

I don't have any validate methods in my ApplicantForm class which
extends ValidatorForm.

Every help is appreciated.

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



Re: Validation only occurs client side

2005-03-23 Thread Bill Siggelkow
At first glance it looks okay -- I suggest you set a breakpoint in the 
ValidatorForm.validate() method (or you could override the method) to 
see if it gets called. If not, then I would look into your request 
processor (which I noticed was a custom one).

-Bill Siggelkow
On 2005-03-23 11:09:06 -0500, tarek.nabil [EMAIL PROTECTED] said:
Hi,
I'm having a really weird problem. This is the first time I use the
Validator. I expected to have some problems with client side
validations, but what I found was client side validations are working
but server side validations aren't!!
The fact that client-side validations work, I think, means that I've
done the configuration correctly. But why isn't it doing anything on the
server side?!!!
I made sure that validate is set to true on my action tags. I double
checked everything else and I believe everything is done correctly. Any
ideas?
validator-rules.xml -- the default
validation.xml has only a single formset element
   formset
  formname=applicantForm
 fieldproperty=applicantId
   depends=required
 /field
 fieldproperty=nameA
   depends=required
 /field
  /form
 /formset
struts-config.xml
  form-beans
form-bean name=applicantForm
type=ae.gov.dphq.traffic.eng.actions.ApplicantForm/
  /form-beans
  action-mappings
action path=/applicant type=some.package.ApplicantAction
name=applicantForm input=/tps/applicant.jsp scope=request
validate=true
  forward name=search path=/applicantSearch.do/
  forward name=add path=/applicantAdd.do/
  forward name=update path=/applicantUpdate.do/
  forward name=delete path=/applicantDelete.do/
/action
  /action-mappings
  controller
processorClass=oracle.jbo.html.struts11.BC4JRequestProcessor
contentType=text/html;charset=windows-1256/
  message-resources
parameter=ae.gov.dphq.traffic.eng.ApplicationResources/
  plug-in className=org.apache.struts.validator.ValidatorPlugIn
set-property property=pathnames
value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/
  /plug-in
I don't have any validate methods in my ApplicantForm class which
extends ValidatorForm.
Every help is appreciated.


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