Server side Validation

2004-03-23 Thread Joao Batistella
Hello.

I'm using the Validator framework to validate user input and I'm having some
problems.

I've configured my form validation in the correct file.

The Javascript validation works fine but when I disable javascript
validation to see the server side validation behavior, I have the error
messages but without the field that generate the error, like this:
The field  is required.

Inside the  it was suposed to be the name that I configure in
ApplicationResources. How can Javascript validation works fine and server
side doesn't?

Thanks,
JP


Regarding Server Side Validation in Struts

2004-01-29 Thread Ramachandran

Hi all,

 Can any one can tell, how to perform server side validation using struts. 
For example there is foem called departments, here depname is unique. How can i 
perform here.

 I know the logic at all. But is there any validator here.Can any one have 
any idea. Please mail regarding this...

Thanks,
Ram


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



RE: Regarding Server Side Validation in Struts

2004-01-29 Thread McCormack, Chris
http://www.developer.com/java/other/article.php/2214681

-Original Message-
From: Ramachandran [mailto:[EMAIL PROTECTED]
Sent: 29 January 2004 12:02
To: Struts Users Mailing List
Subject: Regarding Server Side Validation in Struts



Hi all,

 Can any one can tell, how to perform server side validation using struts. 
For example there is foem called departments, here depname is unique. How can i 
perform here.

 I know the logic at all. But is there any validator here.Can any one have 
any idea. Please mail regarding this...

Thanks,
Ram


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


***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.



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



Re: Regarding Server Side Validation in Struts

2004-01-29 Thread shankarr
Hi!
My $0.02 on this.
As a design, it is best if we let the db throw exception and we handle it 
using ActionError/ActionMessage in the Action file.
I feel it is better that way. Then, you can formulate the page using 
html:errors/ and the application.resources .
This is my understanding.
I am willing to learn though.

Richie

At 05:31 PM 1/29/2004 +0530, you wrote:

Hi all,

 Can any one can tell, how to perform server side validation 
using struts. For example there is foem called departments, here depname 
is unique. How can i perform here.

 I know the logic at all. But is there any validator here.Can 
any one have any idea. Please mail regarding this...

Thanks,
Ram
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To achieve all that is possible, one must attempt the impossible



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


AUTO {ICICICARE#005-216-213}Regarding Server Side Validation in Struts

2004-01-29 Thread NRI Cell
Dear Sir / Madam,Thank you for writing to [EMAIL PROTECTED] We confirm receipt of your 
mail and assure you of a response shortly.To help us serve you better, we would 
request you to kindly mention your account number or any reference number you may have 
in your future correspondence.  Kindly visit our website www.icicibank.com\nri to know 
more on our products and services.  With regards,Customer Care 
ICICI Bank Limited This communication being sent by ICICI Bank Ltd. is privileged and 
confidential, and is directed to and for the use of the addressee only. If this 
message reaches anyone other than the intended recipient, we request the reader not to 
reproduce, copy, disseminate or in any manner distribute it. We further request such 
recipient to notify us immediately by return email and delete the original message. 
ICICI Bank Ltd. does not guarantee the security of any information transmitted 
electronically and is not liable for the proper, timely and complete transmission 
thereof. Before opening any attachments please check them for viruses and defects.



AUTO {ICICICARE#005-216-626}Regarding Server Side Validation in Struts

2004-01-29 Thread NRI Cell
Dear Sir / Madam,Thank you for writing to [EMAIL PROTECTED] We confirm receipt of your 
mail and assure you of a response shortly.To help us serve you better, we would 
request you to kindly mention your account number or any reference number you may have 
in your future correspondence.  Kindly visit our website www.icicibank.com\nri to know 
more on our products and services.  With regards,Customer Care 
ICICI Bank Limited This communication being sent by ICICI Bank Ltd. is privileged and 
confidential, and is directed to and for the use of the addressee only. If this 
message reaches anyone other than the intended recipient, we request the reader not to 
reproduce, copy, disseminate or in any manner distribute it. We further request such 
recipient to notify us immediately by return email and delete the original message. 
ICICI Bank Ltd. does not guarantee the security of any information transmitted 
electronically and is not liable for the proper, timely and complete transmission 
thereof. Before opening any attachments please check them for viruses and defects.



AUTO {ICICICARE#005-218-311}Regarding Server Side Validation in Struts

2004-01-29 Thread NRI Cell
Dear Sir / Madam,Thank you for writing to [EMAIL PROTECTED] We confirm receipt of your 
mail and assure you of a response shortly.To help us serve you better, we would 
request you to kindly mention your account number or any reference number you may have 
in your future correspondence.  Kindly visit our website www.icicibank.com\nri to know 
more on our products and services.  With regards,Customer Care 
ICICI Bank Limited This communication being sent by ICICI Bank Ltd. is privileged and 
confidential, and is directed to and for the use of the addressee only. If this 
message reaches anyone other than the intended recipient, we request the reader not to 
reproduce, copy, disseminate or in any manner distribute it. We further request such 
recipient to notify us immediately by return email and delete the original message. 
ICICI Bank Ltd. does not guarantee the security of any information transmitted 
electronically and is not liable for the proper, timely and complete transmission 
thereof. Before opening any attachments please check them for viruses and defects.



server-side validation with Validator

2003-12-30 Thread Brice Ruth
OK, I have to admit, I'm a bit confused using Validator, despite looking 
at the online docs  having Ted's excellent book at hand.

I have everything setup to do server-side validation, as far as I can 
tell ... I've set a breakpoint in DynaValidatorActionForm.validate and 
it is getting called ... to test if the validation is working, I've 
disabled the JavaScript validation by removing the onsubmit call for my 
html:form element ... fine, now I can submit non-valid data. However, 
I keep getting to my Action, instead of being shunted back to the input 
page. My input page is defined as a tile definition, here's what my 
struts-config.xml looks like (for that section):

action
   path=/US/garden/resources/orangeThumbApply
   type=com.fiskars.struts.actions.OrangeThumbSaveData
   name=orangeThumbApp
   scope=request
   validate=true
   input=garden.orangeThumbForm
   forward
   name=success
   path=garden.orangeThumbThankyou/
/action
Does anyone see anything wrong here? To test the validation, I've left 
out a required field and I've entered a text string for a numeric 
(short) value.

My JavaScript validation seems to be working like a champ, but the 
server-side stuff seems MIA, even though its being called.

TIA

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: server-side validation with Validator

2003-12-30 Thread Brice Ruth
OK, nevermind ... I just needed to change DynaValidatorActionForm to 
DynaValidatorForm ... now it works.

Brice Ruth wrote:

OK, I have to admit, I'm a bit confused using Validator, despite 
looking at the online docs  having Ted's excellent book at hand.

I have everything setup to do server-side validation, as far as I can 
tell ... I've set a breakpoint in DynaValidatorActionForm.validate and 
it is getting called ... to test if the validation is working, I've 
disabled the JavaScript validation by removing the onsubmit call for 
my html:form element ... fine, now I can submit non-valid data. 
However, I keep getting to my Action, instead of being shunted back to 
the input page. My input page is defined as a tile definition, here's 
what my struts-config.xml looks like (for that section):

action
   path=/US/garden/resources/orangeThumbApply
   type=com.fiskars.struts.actions.OrangeThumbSaveData
   name=orangeThumbApp
   scope=request
   validate=true
   input=garden.orangeThumbForm
   forward
   name=success
   path=garden.orangeThumbThankyou/
/action
Does anyone see anything wrong here? To test the validation, I've left 
out a required field and I've entered a text string for a numeric 
(short) value.

My JavaScript validation seems to be working like a champ, but the 
server-side stuff seems MIA, even though its being called.

TIA

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: server-side validation with Validator

2003-12-30 Thread Matthias Wessendorf
Hi,

The DynaValidatorForm will match the formset name with the form-bean
name.
it uses mapping.getAttribute() to init the validator


The DynaValidatorActionForm will match the formset name with the
action-mapping path.
it uses mapping.getPath() for init the validator

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 7:11 PM
To: Struts Users Mailing List
Subject: Re: server-side validation with Validator


OK, nevermind ... I just needed to change DynaValidatorActionForm to 
DynaValidatorForm ... now it works.

Brice Ruth wrote:

 OK, I have to admit, I'm a bit confused using Validator, despite
 looking at the online docs  having Ted's excellent book at hand.

 I have everything setup to do server-side validation, as far as I can
 tell ... I've set a breakpoint in DynaValidatorActionForm.validate and

 it is getting called ... to test if the validation is working, I've 
 disabled the JavaScript validation by removing the onsubmit call for 
 my html:form element ... fine, now I can submit non-valid data. 
 However, I keep getting to my Action, instead of being shunted back to

 the input page. My input page is defined as a tile definition, here's 
 what my struts-config.xml looks like (for that section):

 action
path=/US/garden/resources/orangeThumbApply
type=com.fiskars.struts.actions.OrangeThumbSaveData
name=orangeThumbApp
scope=request
validate=true
input=garden.orangeThumbForm
forward
name=success
path=garden.orangeThumbThankyou/
 /action

 Does anyone see anything wrong here? To test the validation, I've left
 out a required field and I've entered a text string for a numeric 
 (short) value.

 My JavaScript validation seems to be working like a champ, but the
 server-side stuff seems MIA, even though its being called.

 TIA


-- 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


-
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: server-side validation with Validator

2003-12-30 Thread Brice Ruth
Yeah, I read pretty much exactly that in Ted's book, but I have to 
admit, I'm not entirely sure what it means ... someone previously also 
mentioned that the DynaValidatorForm uses the name attribute of the 
action definition, whereas the DynaValidatorActionForm uses the path 
... well, my path is the path for the Action ... I'm not sure under 
what circumstances one would use DynaValidatorActionForm, I guess ...

Matthias Wessendorf wrote:

Hi,

The DynaValidatorForm will match the formset name with the form-bean
name.
it uses mapping.getAttribute() to init the validator
The DynaValidatorActionForm will match the formset name with the
action-mapping path.
it uses mapping.getPath() for init the validator
-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 30, 2003 7:11 PM
To: Struts Users Mailing List
Subject: Re: server-side validation with Validator

OK, nevermind ... I just needed to change DynaValidatorActionForm to 
DynaValidatorForm ... now it works.

Brice Ruth wrote:

 

OK, I have to admit, I'm a bit confused using Validator, despite
looking at the online docs  having Ted's excellent book at hand.
I have everything setup to do server-side validation, as far as I can
tell ... I've set a breakpoint in DynaValidatorActionForm.validate and
   

 

it is getting called ... to test if the validation is working, I've 
disabled the JavaScript validation by removing the onsubmit call for 
my html:form element ... fine, now I can submit non-valid data. 
However, I keep getting to my Action, instead of being shunted back to
   

 

the input page. My input page is defined as a tile definition, here's 
what my struts-config.xml looks like (for that section):

action
  path=/US/garden/resources/orangeThumbApply
  type=com.fiskars.struts.actions.OrangeThumbSaveData
  name=orangeThumbApp
  scope=request
  validate=true
  input=garden.orangeThumbForm
  forward
  name=success
  path=garden.orangeThumbThankyou/
/action
Does anyone see anything wrong here? To test the validation, I've left
out a required field and I've entered a text string for a numeric 
(short) value.

My JavaScript validation seems to be working like a champ, but the
server-side stuff seems MIA, even though its being called.
TIA

   

 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: server-side validation with Validator

2003-12-30 Thread Jarnot Voytek Contr AU HQ/SC
When you want different validations for the same form bean when used by
different actions (or action paths).

--
Voytek Jarnot
Quantum materiae materietur marmota monax si marmota monax materiam possit
materiari?


 -Original Message-
 From: Brice Ruth [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 30, 2003 12:29 PM
 To: Struts Users Mailing List
 Subject: Re: server-side validation with Validator
 
 
 Yeah, I read pretty much exactly that in Ted's book, but I have to 
 admit, I'm not entirely sure what it means ... someone 
 previously also 
 mentioned that the DynaValidatorForm uses the name attribute of the 
 action definition, whereas the DynaValidatorActionForm uses 
 the path 
 ... well, my path is the path for the Action ... I'm not sure under 
 what circumstances one would use DynaValidatorActionForm, I guess ...
 
 Matthias Wessendorf wrote:
 
 Hi,
 
 The DynaValidatorForm will match the formset name with the form-bean
 name.
 it uses mapping.getAttribute() to init the validator
 
 
 The DynaValidatorActionForm will match the formset name with the
 action-mapping path.
 it uses mapping.getPath() for init the validator
 
 -Original Message-
 From: Brice Ruth [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, December 30, 2003 7:11 PM
 To: Struts Users Mailing List
 Subject: Re: server-side validation with Validator
 
 
 OK, nevermind ... I just needed to change DynaValidatorActionForm to 
 DynaValidatorForm ... now it works.
 
 Brice Ruth wrote:
 
   
 
 OK, I have to admit, I'm a bit confused using Validator, despite
 looking at the online docs  having Ted's excellent book at hand.
 
 I have everything setup to do server-side validation, as 
 far as I can
 tell ... I've set a breakpoint in 
 DynaValidatorActionForm.validate and
 
 
 
   
 
 it is getting called ... to test if the validation is working, I've 
 disabled the JavaScript validation by removing the onsubmit 
 call for 
 my html:form element ... fine, now I can submit non-valid data. 
 However, I keep getting to my Action, instead of being 
 shunted back to
 
 
 
   
 
 the input page. My input page is defined as a tile 
 definition, here's 
 what my struts-config.xml looks like (for that section):
 
 action
path=/US/garden/resources/orangeThumbApply
type=com.fiskars.struts.actions.OrangeThumbSaveData
name=orangeThumbApp
scope=request
validate=true
input=garden.orangeThumbForm
forward
name=success
path=garden.orangeThumbThankyou/
 /action
 
 Does anyone see anything wrong here? To test the 
 validation, I've left
 out a required field and I've entered a text string for a numeric 
 (short) value.
 
 My JavaScript validation seems to be working like a champ, but the
 server-side stuff seems MIA, even though its being called.
 
 TIA
 
 
 
 
   
 
 
 -- 
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.
 
 
 -
 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: server-side validation with Validator

2003-12-30 Thread Robert Taylor
One could use DynaValidatorActionForm for wizard processes that used the
same form but
validate different fields based on the path.

robert

 -Original Message-
 From: Brice Ruth [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 30, 2003 1:29 PM
 To: Struts Users Mailing List
 Subject: Re: server-side validation with Validator


 Yeah, I read pretty much exactly that in Ted's book, but I have to
 admit, I'm not entirely sure what it means ... someone previously also
 mentioned that the DynaValidatorForm uses the name attribute of the
 action definition, whereas the DynaValidatorActionForm uses the path
 ... well, my path is the path for the Action ... I'm not sure under
 what circumstances one would use DynaValidatorActionForm, I guess ...

 Matthias Wessendorf wrote:

 Hi,
 
 The DynaValidatorForm will match the formset name with the form-bean
 name.
 it uses mapping.getAttribute() to init the validator
 
 
 The DynaValidatorActionForm will match the formset name with the
 action-mapping path.
 it uses mapping.getPath() for init the validator
 
 -Original Message-
 From: Brice Ruth [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 30, 2003 7:11 PM
 To: Struts Users Mailing List
 Subject: Re: server-side validation with Validator
 
 
 OK, nevermind ... I just needed to change DynaValidatorActionForm to
 DynaValidatorForm ... now it works.
 
 Brice Ruth wrote:
 
 
 
 OK, I have to admit, I'm a bit confused using Validator, despite
 looking at the online docs  having Ted's excellent book at hand.
 
 I have everything setup to do server-side validation, as far as I can
 tell ... I've set a breakpoint in DynaValidatorActionForm.validate and
 
 
 
 
 
 it is getting called ... to test if the validation is working, I've
 disabled the JavaScript validation by removing the onsubmit call for
 my html:form element ... fine, now I can submit non-valid data.
 However, I keep getting to my Action, instead of being shunted back to
 
 
 
 
 
 the input page. My input page is defined as a tile definition, here's
 what my struts-config.xml looks like (for that section):
 
 action
path=/US/garden/resources/orangeThumbApply
type=com.fiskars.struts.actions.OrangeThumbSaveData
name=orangeThumbApp
scope=request
validate=true
input=garden.orangeThumbForm
forward
name=success
path=garden.orangeThumbThankyou/
 /action
 
 Does anyone see anything wrong here? To test the validation, I've left
 out a required field and I've entered a text string for a numeric
 (short) value.
 
 My JavaScript validation seems to be working like a champ, but the
 server-side stuff seems MIA, even though its being called.
 
 TIA
 
 
 
 
 
 

 --
 Brice D. Ruth
 Sr. IT Analyst
 Fiskars Brands, Inc.


 -
 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: server-side validation with Validator

2003-12-30 Thread Brice Ruth
Aha, ok ... got it now. Thanks!

Robert Taylor wrote:

One could use DynaValidatorActionForm for wizard processes that used the
same form but
validate different fields based on the path.
robert

 

-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 1:29 PM
To: Struts Users Mailing List
Subject: Re: server-side validation with Validator
Yeah, I read pretty much exactly that in Ted's book, but I have to
admit, I'm not entirely sure what it means ... someone previously also
mentioned that the DynaValidatorForm uses the name attribute of the
action definition, whereas the DynaValidatorActionForm uses the path
... well, my path is the path for the Action ... I'm not sure under
what circumstances one would use DynaValidatorActionForm, I guess ...
Matthias Wessendorf wrote:

   

Hi,

The DynaValidatorForm will match the formset name with the form-bean
name.
it uses mapping.getAttribute() to init the validator
The DynaValidatorActionForm will match the formset name with the
action-mapping path.
it uses mapping.getPath() for init the validator
-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 30, 2003 7:11 PM
To: Struts Users Mailing List
Subject: Re: server-side validation with Validator
OK, nevermind ... I just needed to change DynaValidatorActionForm to
DynaValidatorForm ... now it works.
Brice Ruth wrote:



 

OK, I have to admit, I'm a bit confused using Validator, despite
looking at the online docs  having Ted's excellent book at hand.
I have everything setup to do server-side validation, as far as I can
tell ... I've set a breakpoint in DynaValidatorActionForm.validate and
   

 

it is getting called ... to test if the validation is working, I've
disabled the JavaScript validation by removing the onsubmit call for
my html:form element ... fine, now I can submit non-valid data.
However, I keep getting to my Action, instead of being shunted back to
   

 

the input page. My input page is defined as a tile definition, here's
what my struts-config.xml looks like (for that section):
action
 path=/US/garden/resources/orangeThumbApply
 type=com.fiskars.struts.actions.OrangeThumbSaveData
 name=orangeThumbApp
 scope=request
 validate=true
 input=garden.orangeThumbForm
 forward
 name=success
 path=garden.orangeThumbThankyou/
/action
Does anyone see anything wrong here? To test the validation, I've left
out a required field and I've entered a text string for a numeric
(short) value.
My JavaScript validation seems to be working like a champ, but the
server-side stuff seems MIA, even though its being called.
TIA



   

 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
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]
 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Validator: Unwanted Client side AND Server side validation

2003-12-03 Thread inaminute
Hi,

When using client side validation the form is submitted regardless of Javascript
validation check occuring (After clicking OK on the Javascript popup warning
following an error the form get submitted anyway). 

I used validation already without this behaviour to occur ... I must be
misconfiguring something but cannot find out what it is. Validation works as
expected Server side.

I am using Struts 1.1 with the bundled Validator together with Scaffold 1_0.

Any idea welcome, Patrick


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



RE: Validator: Unwanted Client side AND Server side validation

2003-12-03 Thread Andy Schmidgall
Make sure you you have the return statement in the onsubmit handler.
Otherwise it will always submit the form.

It needs to look like this: onsubmit=return validateFooForm(this)

If that's not the problem, you may be trying to validate using an
incorrect field name. That's happened to me a few times.

-Andy

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2003 5:50 AM
To: [EMAIL PROTECTED]
Subject: Validator: Unwanted Client side AND Server side validation


Hi,

When using client side validation the form is submitted regardless of
Javascript validation check occuring (After clicking OK on the
Javascript popup warning following an error the form get submitted
anyway). 

I used validation already without this behaviour to occur ... I must be
misconfiguring something but cannot find out what it is. Validation
works as expected Server side.

I am using Struts 1.1 with the bundled Validator together with Scaffold
1_0.

Any idea welcome, Patrick


-
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: Validator: Unwanted Client side AND Server side validation

2003-12-03 Thread Rouven Gehm
Well i have to set validate false of the action in the struts-config.xml,
then i only have client side validation without submitting,
but then i have to call the .validate Method in the action to do the 
server-side validation, if i disable JavaScript.

Any more ideas to this problem ?


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 12:49 PM
Subject: Validator: Unwanted Client side AND Server side validation


 Hi,
 
 When using client side validation the form is submitted regardless of Javascript
 validation check occuring (After clicking OK on the Javascript popup warning
 following an error the form get submitted anyway). 
 
 I used validation already without this behaviour to occur ... I must be
 misconfiguring something but cannot find out what it is. Validation works as
 expected Server side.
 
 I am using Struts 1.1 with the bundled Validator together with Scaffold 1_0.
 
 Any idea welcome, Patrick
 
 
 -
 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]



Server side Validation without exclusively submitting the Submit button

2003-11-28 Thread VENKATESH GANGAL
Hi,

I am having multiple JSP pages and these will appear in only one page after rendering 
using CSS.There is a left pane which will look like tabs(basically these are links) 
and these tabs act as hyperlinks to view that particular page on the right hand side 
i.e., for ex when u click on tab A ,A.JSP will appear hand side .

Now the requirement is , I will have to validate each form ( JSP) on the server side 
and as we are using Struts framework, how will I validate these forms when I swicth 
between tabs.As everything rests with the controller, can we have a mechanism to 
validate these forms when I switch between tabs.

Right now each of these tabs are action classes and they have an associated form 
classes.


Can anyone please let me know how can go about validating the present form when I try 
to switch to switch to other tab???

Thanks in advance...

Cheers...
Venkat

Server side Validation Problems

2003-07-09 Thread guruprasad jakka
Dear Struts users,

I have done a simple web-app using validator framework.
the JavaScript validations are proper.But in the server side
validations, i have problems.
Only,the 'required','minlength''maxlength' validations are
working.Rest other validators have no effect even though, i have
used them in the validation.xml file.
eg- validate email-address has no effect even if i enter a
invalid address.

In javascript validations, if I enter a invalid email-id , I am
getting a error,whereas in server side there is no error shown.

Here is my validation.xml file .



form-validation
formset
  formname=registrationForm
 fieldproperty=username
   depends=required,mask,minlength
   msg name=mask
key=loginform.username.invalid/
 arg0 key=loginform.username.displayname/
 arg1 name=minlength key=${var:minlength}
resource=false/
 var
   var-namemask/var-name
   var-value^\w+$/var-value
 /var
 var
   var-nameminlength/var-name
   var-value5/var-value
 /var
 /field
 
 
fieldproperty=password1
   depends=required
 arg0 key=loginform.password1.displayname/
  /field
 
 
 fieldproperty=password2
   depends=required
 arg0 key=loginform.password2.displayname/
  /field
 
 
 fieldproperty=phone
   depends=required
 arg0 key=loginform.phone.displayname/
 
 /field
 fieldproperty=email
   depends=required,email
 arg0 key=loginform.email.displayname/
 /field
  /form
   
   /formset
/form-validation

Please,tell me what would be the problem and how to solve it.



Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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



Adding server-side validation when using DispatchAction

2003-06-08 Thread Alen Ribic
Hey all

I'm currently combining several similar actions using sublass of
DispatchAction class.
I'm using the Validator (validator-rules.xml, validation.xml as plugin) for
my client-side validation successfully.

I'm also using the DynaActionForm for my form bean(s).

Since now I don't have a subclass of ActionForm, how do I override the
validate() method?
Basically, using subclass of ActionForm all the time, I used to place my
server-side validation into the validate() method.
How do I apply server-side validation when using DynaActionForm and
DispatchAction classes?

Thanks
--Alen



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



Re: Adding server-side validation when using DispatchAction

2003-06-08 Thread Alen Ribic
Ok, maybe I don't understand the Validator system well yet.
I would like to apply the server-side and client side validation.
(server-side for if client side falls thought for some or other reason)
What is the best and easiest way to do this?

- Original Message -
From: Alen Ribic [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 10:57 PM
Subject: Adding server-side validation when using DispatchAction


 Hey all

 I'm currently combining several similar actions using sublass of
 DispatchAction class.
 I'm using the Validator (validator-rules.xml, validation.xml as plugin)
for
 my client-side validation successfully.

 I'm also using the DynaActionForm for my form bean(s).

 Since now I don't have a subclass of ActionForm, how do I override the
 validate() method?
 Basically, using subclass of ActionForm all the time, I used to place my
 server-side validation into the validate() method.
 How do I apply server-side validation when using DynaActionForm and
 DispatchAction classes?

 Thanks
 --Alen



 -
 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: Adding server-side validation when using DispatchAction

2003-06-08 Thread David Graham
You need to use either DynaValidatorForm or DynaValidatorActionForm for the 
Struts validator to work.  If you've already configured the validations in 
the xml files then all you should need to do is use the right Dyna classes.

David

Ok, maybe I don't understand the Validator system well yet.
I would like to apply the server-side and client side validation.
(server-side for if client side falls thought for some or other reason)
What is the best and easiest way to do this?
- Original Message -
From: Alen Ribic [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 10:57 PM
Subject: Adding server-side validation when using DispatchAction
 Hey all

 I'm currently combining several similar actions using sublass of
 DispatchAction class.
 I'm using the Validator (validator-rules.xml, validation.xml as plugin)
for
 my client-side validation successfully.

 I'm also using the DynaActionForm for my form bean(s).

 Since now I don't have a subclass of ActionForm, how do I override the
 validate() method?
 Basically, using subclass of ActionForm all the time, I used to place my
 server-side validation into the validate() method.
 How do I apply server-side validation when using DynaActionForm and
 DispatchAction classes?

 Thanks
 --Alen



 -
 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]
_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


[Q] how to do server side validation for popup that closes on submit?

2003-03-13 Thread michael . korolyov
hello,

I need popup that submits some data and then closes and refresh parent
window,
but if server side validation fails then that popup window needs to show
errors and stay.

any ideas hot to do it?

tnx

Best Regards.
Michael.


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



Re: [Q] how to do server side validation for popup that closes on sub mit?

2003-03-13 Thread Mark Lowe
This would work...

validate the form before everything, if okay

return response.write(body 
onload=myfunctionforclosingthiswindowandredirecting the parent()); 
from action servlet

the javascript can be in the popup and the function in only called my 
the response...

hope this helps
mark
Giovedì, 13 mar 2003, alle 17:48 Europe/Rome, 
[EMAIL PROTECTED] ha scritto:

hello,

I need popup that submits some data and then closes and refresh 
parent
window,
but if server side validation fails then that popup window needs to 
show
errors and stay.

any ideas hot to do it?

tnx

Best Regards.
Michael.
-
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: [Q] how to do server side validation for popup that closes on sub mit?

2003-03-13 Thread anis_malkan
how can use response to open a pop-up window and send the user to somewhere else in 
main window from  action/eventhandler function.

Thanks
Anis

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 9:55 AM
To: Struts Users Mailing List
Subject: Re: [Q] how to do server side validation for popup that closes
on sub mit?



This would work...

validate the form before everything, if okay

return response.write(body 
onload=myfunctionforclosingthiswindowandredirecting the parent()); 
from action servlet

the javascript can be in the popup and the function in only called my 
the response...

hope this helps
mark

Giovedì, 13 mar 2003, alle 17:48 Europe/Rome, 
[EMAIL PROTECTED] ha scritto:

 hello,

 I need popup that submits some data and then closes and refresh 
 parent
 window,
 but if server side validation fails then that popup window needs to 
 show
 errors and stay.

 any ideas hot to do it?

 tnx

 Best Regards.
 Michael.


 -
 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: [Q] how to do server side validation for popup that closes on sub mit?

2003-03-13 Thread Mark Lowe
the pop window is already open.. 1000 times.. i really should 
read before barking

the question was how to validate and then close it...

if there's and error then the function isn't called if all okay it is...

i personally don't like send js via the response but I answered the 
question with something that works... You could use a jsp or a trusty 
traditional servlet.

so anus what would you do? 'in response to the question that is'

Giovedì, 13 mar 2003, alle 18:06 Europe/Rome, 
[EMAIL PROTECTED] ha scritto:

how can use response to open a pop-up window and send the user to 
somewhere else in main window from  action/eventhandler function.

Thanks
Anis
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 9:55 AM
To: Struts Users Mailing List
Subject: Re: [Q] how to do server side validation for popup that closes
on sub mit?


This would work...

validate the form before everything, if okay

return response.write(body
onload=myfunctionforclosingthiswindowandredirecting the parent());
from action servlet
the javascript can be in the popup and the function in only called my
the response...
hope this helps
mark
Giovedì, 13 mar 2003, alle 17:48 Europe/Rome,
[EMAIL PROTECTED] ha scritto:
hello,

I need popup that submits some data and then closes and refresh
parent
window,
but if server side validation fails then that popup window needs to
show
errors and stay.
any ideas hot to do it?

tnx

Best Regards.
Michael.
-
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: [Q] how to do server side validation for popup that closes on sub mit?

2003-03-13 Thread michael . korolyov
Thank you, Mark, I understand the idea
I'd add field that will get value after validation Ok in Action class that
then enable onload script in JSP

tnx

Best Regards.
Michael.


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 9:13 AM
To: Struts Users Mailing List
Subject: Re: [Q] how to do server side validation for popup that closes
on sub mit?


the pop window is already open.. 1000 times.. i really should 
read before barking

the question was how to validate and then close it...

if there's and error then the function isn't called if all okay it is...

i personally don't like send js via the response but I answered the 
question with something that works... You could use a jsp or a trusty 
traditional servlet.

so anus what would you do? 'in response to the question that is'

Giovedì, 13 mar 2003, alle 18:06 Europe/Rome, 
[EMAIL PROTECTED] ha scritto:

 how can use response to open a pop-up window and send the user to 
 somewhere else in main window from  action/eventhandler function.

 Thanks
 Anis

 -Original Message-
 From: Mark Lowe [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2003 9:55 AM
 To: Struts Users Mailing List
 Subject: Re: [Q] how to do server side validation for popup that closes
 on sub mit?



 This would work...

 validate the form before everything, if okay

 return response.write(body
 onload=myfunctionforclosingthiswindowandredirecting the parent());
 from action servlet

 the javascript can be in the popup and the function in only called my
 the response...

 hope this helps
 mark

 Giovedì, 13 mar 2003, alle 17:48 Europe/Rome,
 [EMAIL PROTECTED] ha scritto:

 hello,

 I need popup that submits some data and then closes and refresh
 parent
 window,
 but if server side validation fails then that popup window needs to
 show
 errors and stay.

 any ideas hot to do it?

 tnx

 Best Regards.
 Michael.


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



[struts 1.1-b3] problem with server side validation

2003-02-18 Thread Martins Stephane
Hello

Since I've migrated to struts 1.1-b3, I have serious problems with the 
validator included in struts.
Both my webapp and struts-validator.war (from struts package) provoke java 
exceptions.

When I desactivate javascript from my browser (IE 5.5) to check server-side 
validation, I get the current error :

java.lang.NullPointerException at 
java.util.StringTokenizer.(StringTokenizer.java:119)
 at java.util.StringTokenizer.(StringTokenizer.java:135) at 
org.apache.commons.validator.Validator.validateField(Validator.java:502)
 at org.apache.commons.validator.Validator.validate(Validator.java:551)
 at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)
 at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcess  
or.java:912)
 at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:  
255) at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


I've tried :
*   JDK 1.4 and 1.3
*   Tomcat 4.1.12 and 4.1.18
*   and the last nightly build of common-validator.jar

Any ideas ?


Thanks



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




Re: [struts 1.1-b3] problem with server side validation

2003-02-18 Thread Vic Cekvenich
Validator works for me with a late nightly build. Last week I did a 
class, and every student got server and client side validation working.
.V
Martins Stephane wrote:
Hello

Since I've migrated to struts 1.1-b3, I have serious problems with the 
validator included in struts.
Both my webapp and struts-validator.war (from struts package) provoke java 
exceptions.

When I desactivate javascript from my browser (IE 5.5) to check server-side 
validation, I get the current error :

java.lang.NullPointerException at 
java.util.StringTokenizer.(StringTokenizer.java:119)
 at java.util.StringTokenizer.(StringTokenizer.java:135) at 
org.apache.commons.validator.Validator.validateField(Validator.java:502)
 at org.apache.commons.validator.Validator.validate(Validator.java:551)
 at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)
 at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcess  
or.java:912)
 at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:  
255) at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


I've tried :
*	JDK 1.4 and 1.3
*	Tomcat 4.1.12 and 4.1.18
*	and the last nightly build of common-validator.jar

Any ideas ?


Thanks



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




RE: [struts 1.1-b3] problem with server side validation

2003-02-18 Thread Martins Stephane
Thanks for your answer it makes me optimistic...

Can you detail what are your JDK version and your tomcat release ?

I'm using the Struts-validator.war from struts 1.1-b3 build.
I've noticed that all javascript is working well.
If I extend my validate in the actionform, these validations are done after Javascript 
(which is ok).

But there's this exception when the rules from my validation.xml are done from 
server-side.
I have no problem with struts 1.0.2 with the validator 1.0 ...


-Message d'origine-
De: Vic Cekvenich [SMTP:[EMAIL PROTECTED]]
Date:   mardi 18 fevrier 2003 13:26
A:  [EMAIL PROTECTED]
Objet:  Re: [struts 1.1-b3] problem with server side validation

Validator works for me with a late nightly build. Last week I did a 
class, and every student got server and client side validation working.
.V
Martins Stephane wrote:
 Hello
 
 Since I've migrated to struts 1.1-b3, I have serious problems with the 
 validator included in struts.
 Both my webapp and struts-validator.war (from struts package) provoke java 
 exceptions.
 
 When I desactivate javascript from my browser (IE 5.5) to check server-side 
 validation, I get the current error :
 
 java.lang.NullPointerException at 
 java.util.StringTokenizer.(StringTokenizer.java:119)
  at java.util.StringTokenizer.(StringTokenizer.java:135) at 
 org.apache.commons.validator.Validator.validateField(Validator.java:502)
  at org.apache.commons.validator.Validator.validate(Validator.java:551)
  at 
 org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)
  at 
 org.apache.struts.action.RequestProcessor.processValidate(RequestProcess  
 or.java:912)
  at 
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:  
 255) at 
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
  at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
 
 I've tried :
 * JDK 1.4 and 1.3
 * Tomcat 4.1.12 and 4.1.18
 * and the last nightly build of common-validator.jar
 
 Any ideas ?
 
 
 Thanks



-
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: [struts 1.1-b3] problem with server side validation

2003-02-18 Thread Vic Cekvenich


Martins Stephane wrote:

Thanks for your answer it makes me optimistic...

Can you detail what are your JDK version and your tomcat release ?

Latest of both, 1.41 and 4.18


I'm using the Struts-validator.war from struts 1.1-b3 build.
I've noticed that all javascript is working well.
If I extend my validate in the actionform, these validations are done after Javascript (which is ok).

But there's this exception when the rules from my validation.xml are done from server-side.
I have no problem with struts 1.0.2 with the validator 1.0 ...


-Message d'origine-
De:	Vic Cekvenich [SMTP:[EMAIL PROTECTED]]
Date:	mardi 18 fevrier 2003 13:26
A:	[EMAIL PROTECTED]
Objet:	Re: [struts 1.1-b3] problem with server side validation

Validator works for me with a late nightly build. Last week I did a 
class, and every student got server and client side validation working.
.V
Martins Stephane wrote:

Hello

Since I've migrated to struts 1.1-b3, I have serious problems with the 
validator included in struts.
Both my webapp and struts-validator.war (from struts package) provoke java 
exceptions.

When I desactivate javascript from my browser (IE 5.5) to check server-side 
validation, I get the current error :

java.lang.NullPointerException at 
java.util.StringTokenizer.(StringTokenizer.java:119)
at java.util.StringTokenizer.(StringTokenizer.java:135) at 
org.apache.commons.validator.Validator.validateField(Validator.java:502)
at org.apache.commons.validator.Validator.validate(Validator.java:551)
at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)
at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcess  
or.java:912)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:  
255) at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


I've tried :
*	JDK 1.4 and 1.3
*	Tomcat 4.1.12 and 4.1.18
*	and the last nightly build of common-validator.jar

Any ideas ?


Thanks




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




server side validation validate all fields?

2003-01-29 Thread Ginger Cheng
Hello,
	I have a question about the server side validation implemented by 'beta3'. 
When it kicks in, it validates all the fields of the form even though some 
fields I didn't ask for validation in my validation.xml. Like some fields I 
didn't let them depend on required in validation.xml, but server side 
validation thinks they do. Has this thing happened before? Can someone give 
me a hint? Thank you.
	ginger


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



Re: server side validation validate all fields?

2003-01-29 Thread Ginger Cheng
One more thing I want to add is: I defined the fields to be dependent on 
'mask' and 'maxlength' in validation.xml, but it turns out that the fields 
is required from server side validation.

At 11:49 AM 1/29/2003 -0500, you wrote:
Hello,
I have a question about the server side validation implemented by 
'beta3'. When it kicks in, it validates all the fields of the form even 
though some fields I didn't ask for validation in my validation.xml. Like 
some fields I didn't let them depend on required in validation.xml, but 
server side validation thinks they do. Has this thing happened before? 
Can someone give me a hint? Thank you.
ginger


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




server side validation

2003-01-16 Thread Ginger Cheng
Hello,
	can some tell me what package (from where) to download to make the server 
side validation works? for struts-1.1. Thank you.
	ginger


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



RE: server side validation

2003-01-16 Thread Alvarado, Juan (c)
http://home.earthlink.net/~dwinterfeldt/ -- Read the very first sentence.

One word of advise: Before you post to this list, make sure that you do some
research into what you are looking for and that you are not looking to be
spoon fed the answers to your questions.

If you bother to do a search on google (struts validator) you would have had
the answer to your question.

-Original Message-
From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 4:24 PM
To: [EMAIL PROTECTED]
Subject: server side validation


Hello,
can some tell me what package (from where) to download to make the
server 
side validation works? for struts-1.1. Thank you.
ginger


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




Is Server Side Validation Working in Struts 1.1 Beta 3?

2003-01-16 Thread Hohlen, John
Has anyone been able to get server side validation to work with beta 3?  My
team is using client-side (JavaScript) validation, but I decided to test the
server-side validation to make sure it works (as a safety net).  However,
when I did this, server-side validation does not appear to throw any errors
and I get forwarded to the success URL.  I saw some rumblings on the
mailing list about this not working in earlier versions of Struts 1.1, but
nothing of late.  BTW, to disable client-side validation, I simply removed
the onSubmit=return validateMyForm(this) from my hmtl:form tag.  That
should be enough, right?

Thanks,

JOHN

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




RE: server side validation

2003-01-16 Thread Ginger Cheng
As a matter of fact, I did try version1.0 from that one and it did not work 
out for me because the init method in validateForm requires a filed that 
doesn't exist.

At 04:45 PM 1/16/2003 -0500, you wrote:
http://home.earthlink.net/~dwinterfeldt/ -- Read the very first sentence.

One word of advise: Before you post to this list, make sure that you do some
research into what you are looking for and that you are not looking to be
spoon fed the answers to your questions.

If you bother to do a search on google (struts validator) you would have had
the answer to your question.

-Original Message-
From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 4:24 PM
To: [EMAIL PROTECTED]
Subject: server side validation


Hello,
can some tell me what package (from where) to download to make the
server
side validation works? for struts-1.1. Thank you.
ginger


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



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




RE: Is Server Side Validation Working in Struts 1.1 Beta 3?

2003-01-16 Thread Kevin Peters
You can also remove the html:javascript tag as this inserts the JavaScript
for client-side validation.

-Original Message-
From: Hohlen, John [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 5:01 PM
To: Struts-User (E-mail)
Subject: Is Server Side Validation Working in Struts 1.1 Beta 3?


Has anyone been able to get server side validation to work with beta 3?  My
team is using client-side (JavaScript) validation, but I decided to test the
server-side validation to make sure it works (as a safety net).  However,
when I did this, server-side validation does not appear to throw any errors
and I get forwarded to the success URL.  I saw some rumblings on the
mailing list about this not working in earlier versions of Struts 1.1, but
nothing of late.  BTW, to disable client-side validation, I simply removed
the onSubmit=return validateMyForm(this) from my hmtl:form tag.  That
should be enough, right?

Thanks,

JOHN

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


*** 
This electronic mail transmission contains confidential and/or privileged 
information intended only for the person(s) named.  Any use, distribution, 
copying or disclosure by another person is strictly prohibited. 
*** 



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




RE: Is Server Side Validation Working in Struts 1.1 Beta 3?

2003-01-16 Thread Raible, Matt
I've used it and it works fine.  What you have below should be sufficient
for disabling client-side validation.  An even easier way is to turn off
Javascript on your browser (easy in Mozilla or Phoenix, harder in IE).  One
think to make sure of is that the input value is set on your
action-mapping.  If the input refers to a forward name, make sure and set
inputForward=true on your controller element:

http://jakarta.apache.org/struts/userGuide/configuration.html#controller_con
fig

Also, I recently discovered that client-side validation fails if you don't
have all the validator *required* fields on your form.  Server-side still
works in this case.

HTH,

Matt

-Original Message-
From: Hohlen, John [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 3:01 PM
To: Struts-User (E-mail)
Subject: Is Server Side Validation Working in Struts 1.1 Beta 3?


Has anyone been able to get server side validation to work with beta 3?  My
team is using client-side (JavaScript) validation, but I decided to test the
server-side validation to make sure it works (as a safety net).  However,
when I did this, server-side validation does not appear to throw any errors
and I get forwarded to the success URL.  I saw some rumblings on the
mailing list about this not working in earlier versions of Struts 1.1, but
nothing of late.  BTW, to disable client-side validation, I simply removed
the onSubmit=return validateMyForm(this) from my hmtl:form tag.  That
should be enough, right?

Thanks,

JOHN

--
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[2]: server side validation

2003-01-16 Thread Rick Reumann
On Thursday, January 16, 2003, 5:00:19 PM, Ginger wrote:

GC As a matter of fact, I did try version1.0 from that one and it did
GC not work  out for me because the init method in validateForm
GC requires a filed that  doesn't exist.

When you install the latest struts it comes with all the validation
stuff you need. Nothing extra to install. Best bet is to look at the
struts-validator example that comes with struts and try to follow it
the best you can. Look at the struts-config.xml file, look at the
validation.xml etc. Without a specific question it's difficult to know
what part you are having trouble with.


-- 

Rick
mailto:[EMAIL PROTECTED]


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




Re: Is Server Side Validation Working in Struts 1.1 Beta 3?

2003-01-16 Thread Rick Reumann
On Thursday, January 16, 2003, 5:01:28 PM, John wrote:

HJ Has anyone been able to get server side validation to work with
HJ beta 3?

Seems to be working fine for me.

-- 

Rick
mailto:[EMAIL PROTECTED]


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




RE: server side validation

2003-01-16 Thread Mark Galbreath
I am probably missing something here because this is too obvious, but try
this:

http://jakarta.apache.org/struts/userGuide/dev_validator.html

Mark

-Original Message-
From: Ginger Cheng [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 16, 2003 5:00 PM


As a matter of fact, I did try version1.0 from that one and it did not work 
out for me because the init method in validateForm requires a filed that 
doesn't exist.

At 04:45 PM 1/16/2003 -0500, you wrote:
http://home.earthlink.net/~dwinterfeldt/ -- Read the very first 
sentence.

One word of advise: Before you post to this list, make sure that you do 
some research into what you are looking for and that you are not 
looking to be spoon fed the answers to your questions.

If you bother to do a search on google (struts validator) you would 
have had the answer to your question.

-Original Message-
From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 4:24 PM

 can some tell me what package (from where) to download to make 
the server side validation works? for struts-1.1. Thank you.
 ginger



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




RE: Struts validating with beta2 not working for server-side validation

2002-12-18 Thread John . E . Gregg
I can contribute a tiny bit to this issue.  I had the same server-side
validation problem and tried to use the debugger on it.  I couldn't figure
out what version of the src to use with the struts 1.1b2 commons-validator
jar, so I just got the latest commons-validator src release and built it
myself.  Once I started using this new jar, validation works almost
correctly.  My simple example works, but the message key isn't resolved.
Instead I get ???en_US.cam.form1.error.key1???.  That's the right key
except for the prepended locale stuff.

I haven't looked at the source code carefully, but I think Bens' concern
isn't a problem.  The ActionErrors instance is passed to the initValidator()
method.  The validator then holds on to that ref and populates it as
necessary.  This is all just speculation, though.  I know the code works.

john


-Original Message-
From: Michelle Harris [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 16, 2002 6:51 AM
To: Struts Users Mailing List; Struts Users Mailing List;
[EMAIL PROTECTED]
Subject: RE: Struts validating with beta2 not working for server-side
validation


I too haven't been able to get server-side validation to work. Although I
have been using a different release. When I use validator-1.0 from
dwinterfeldt's site, using server side validation results in nothing being
validated as described in Bens Kwable message.
 
Thanks,
Michelle Harris

-Original Message- 
From: Kwabla, Bens [mailto:[EMAIL PROTECTED]] 
Sent: Mon 12/16/2002 07:13 
To: 'Struts Users Mailing List' 
Cc: 
Subject: Struts validating with beta2 not working for server-side
validation



Hi All!

When I switch from client-side to server-side validation, the
validation is
not effected. Now I called super.validate(..) in the validate(..)
method of
my formbean (derived from ValidatorForm) and logged out
errors.size() which
turned out to be 0, apparently indicating that my errors Object is
empty. I
further checked the ValidatorForm.validate(..) method of the latest
nightly
build and saw this code...

public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request) {

ServletContext application =
getServlet().getServletContext();
ActionErrors errors = new ActionErrors();

Validator validator =
Resources.initValidator(mapping.getAttribute(),
 this,
 application, request,
 errors, page);

try {
validatorResults = validator.validate();
} catch (ValidatorException e) {
log.error(e.getMessage(), e);
}
   

return errors;
}
What I don't understand is the errors Object is returned, but I
don't see
when it is filled with the validation results. Is it likely there is
a bug
in here?


-Ursprüngliche Nachricht-
Von: David Graham [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 13. Dezember 2002 18:43
An: [EMAIL PROTECTED]
Betreff: Re: Struts validating with beta2 not working


You need to tell us exactly what not working means.  Did you
replace all
the jars in WEB_INF/lib with the new ones for beta 2?

David


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




Re: Struts validating with beta2 not working for server-side validation

2002-12-18 Thread Rob Leland
I haven't been following this thread, but whenever a bug is discovered
try downlading a recient nightly build. A number of bugs have been fixed
since 1.1b2.

-Rob 


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



Struts validating with beta2 not working for server-side validation

2002-12-16 Thread Kwabla, Bens
Hi All!

When I switch from client-side to server-side validation, the validation is
not effected. Now I called super.validate(..) in the validate(..) method of
my formbean (derived from ValidatorForm) and logged out errors.size() which
turned out to be 0, apparently indicating that my errors Object is empty. I
further checked the ValidatorForm.validate(..) method of the latest nightly
build and saw this code...

public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request) {

ServletContext application = getServlet().getServletContext();
ActionErrors errors = new ActionErrors();

Validator validator =
Resources.initValidator(mapping.getAttribute(),
 this,
 application, request,
 errors, page);

try {
validatorResults = validator.validate();
} catch (ValidatorException e) {
log.error(e.getMessage(), e);
}


return errors;
}
What I don't understand is the errors Object is returned, but I don't see
when it is filled with the validation results. Is it likely there is a bug
in here?


-Ursprüngliche Nachricht-
Von: David Graham [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 13. Dezember 2002 18:43
An: [EMAIL PROTECTED]
Betreff: Re: Struts validating with beta2 not working


You need to tell us exactly what not working means.  Did you replace all 
the jars in WEB_INF/lib with the new ones for beta 2?

David






From: Kwabla, Bens [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Struts validating with beta2 not working
Date: Fri, 13 Dec 2002 14:40:30 +0100

Hi All!

I had the client-side validation working under struts version before the
beta 2. Now my application has been migrated to the beta 2 of struts. Since
then, my client-side validation is no longer working. I understand the
validating logic has been adopted into commons. Can some tell me what is
happening?

Bens Kwabla

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 13. Dezember 2002 14:35
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: RE: Re: OptionsCollection


Hi,
There are many ways of doing this.So first is as the collection is being
displayed on screen,make it an attribute of form and popolate it in action
on
form.So in jsp u will access like a form attribute.

But the problem with this approach is If u get an error and forward back 
the

user to same jsp, u loose the collection data as u are directly going to 
the

screen.So the solution could be have a generic action which will be called
in
case of errors and the action will populate form with list before 
forwarding
it
to same jsp.

Else U can have lazy in itialising forms.i.e forms getList emthod itself
will
call service to get data if list is null.And then in this case ,u can just
use
an epty action class which does nothing but forwarsd to success which is
the
origicnal jsp.But this action will be mapped with the Original actions form
so
that the form will use its auto population mechanism to get the list..But i
dont like this approach ..just not a good design i think.But very
conveninent.


Hope this helps,
Regards,
Shirish

-Original Message-
From: marklowe [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 12:12 PM
To: struts-user
Cc: marklowe
Subject: Re: OptionsCollection


Okay... But a drop down menu is screen data.

And a list of companies is something that will be used more than once.

So I have a normal class in my model layer

ListCompanies

In my UserAction

(ListCompanies).getCompanies();

But this Action's primary job is to return a list of users (which it does).

As the list is screen data i should be defining this in my form bean? This
is something thats being confusing me for weeks. If i've a bunch of
collections how can i make them available to iterate tags and select menus,
without using useBean (sorry silly design constraint, but beyond my
control).

Hopefully I'm just being silly, i could really do with some pointers as
where i'm missing the point.

Cheers mark


On 13-12-2002 11:49, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

  Also i dont understand why u need to access the request directly.I mean
why
  are
  u setting all the collections as request attributes.GEnerally I think 
the
good
  design is when u r FormBEan represents the screen data.So in this case
  whatever
  u need on screen will become attribute of form.
  I know it does not make much difference in implemantation but as a 
design
it
  becomes pretty straight forward.I mean for an action , if u just look at
the
  form, u know what is being displayed.So u just populate the form in
action.
 
  Any comments... :-))
 
 
  -Original Message-
  From: VEDRE [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 13

RE: Struts validating with beta2 not working for server-side validation

2002-12-16 Thread Michelle Harris
I too haven't been able to get server-side validation to work. Although I have been 
using a different release. When I use validator-1.0 from dwinterfeldt's site, using 
server side validation results in nothing being validated as described in Bens Kwable 
message.
 
Thanks,
Michelle Harris

-Original Message- 
From: Kwabla, Bens [mailto:[EMAIL PROTECTED]] 
Sent: Mon 12/16/2002 07:13 
To: 'Struts Users Mailing List' 
Cc: 
Subject: Struts validating with beta2 not working for server-side validation



Hi All!

When I switch from client-side to server-side validation, the validation is
not effected. Now I called super.validate(..) in the validate(..) method of
my formbean (derived from ValidatorForm) and logged out errors.size() which
turned out to be 0, apparently indicating that my errors Object is empty. I
further checked the ValidatorForm.validate(..) method of the latest nightly
build and saw this code...

public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request) {

ServletContext application = getServlet().getServletContext();
ActionErrors errors = new ActionErrors();

Validator validator =
Resources.initValidator(mapping.getAttribute(),
 this,
 application, request,
 errors, page);

try {
validatorResults = validator.validate();
} catch (ValidatorException e) {
log.error(e.getMessage(), e);
}
   

return errors;
}
What I don't understand is the errors Object is returned, but I don't see
when it is filled with the validation results. Is it likely there is a bug
in here?


-Ursprüngliche Nachricht-
Von: David Graham [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 13. Dezember 2002 18:43
An: [EMAIL PROTECTED]
Betreff: Re: Struts validating with beta2 not working


You need to tell us exactly what not working means.  Did you replace all
the jars in WEB_INF/lib with the new ones for beta 2?

David






From: Kwabla, Bens [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Struts validating with beta2 not working
Date: Fri, 13 Dec 2002 14:40:30 +0100

Hi All!

I had the client-side validation working under struts version before the
beta 2. Now my application has been migrated to the beta 2 of struts. Since
then, my client-side validation is no longer working. I understand the
validating logic has been adopted into commons. Can some tell me what is
happening?

Bens Kwabla

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 13. Dezember 2002 14:35
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: RE: Re: OptionsCollection


Hi,
There are many ways of doing this.So first is as the collection is being
displayed on screen,make it an attribute of form and popolate it in action
on
form.So in jsp u will access like a form attribute.

But the problem with this approach is If u get an error and forward back
the

user to same jsp, u loose the collection data as u are directly going to
the

screen.So the solution could be have a generic action which will be called
in
case of errors and the action will populate form with list before
forwarding
it
to same jsp.

Else U can have lazy in itialising forms.i.e forms getList emthod itself
will
call service to get data if list is null.And then in this case ,u can just
use
an epty action class which does nothing but forwarsd to success which is
the
origicnal jsp.But this action will be mapped with the Original actions form
so
that the form will use its auto population mechanism to get the list..But i
dont like this approach ..just not a good design i think.But very
conveninent.


Hope this helps,
Regards,
Shirish

-Original Message

Re: Struts validating with beta2 not working for server-side validation

2002-12-16 Thread Michelle Harris
I correct myself. The validation didn't appear to get called because the 
flag wasn't set and there were xml errors in validation.xml. My bad. 
Though we are still getting strange exceptionsso it's not working 
for us (yet).

Best,
Michelle

Michelle Harris wrote:
I too haven't been able to get server-side validation to work. Although I have been using a different release. When I use validator-1.0 from dwinterfeldt's site, using server side validation results in nothing being validated as described in Bens Kwable message.
 
Thanks,
Michelle Harris

	-Original Message- 
	From: Kwabla, Bens [mailto:[EMAIL PROTECTED]] 
	Sent: Mon 12/16/2002 07:13 
	To: 'Struts Users Mailing List' 
	Cc: 
	Subject: Struts validating with beta2 not working for server-side validation
	
	

	Hi All!
	
	When I switch from client-side to server-side validation, the validation is
	not effected. Now I called super.validate(..) in the validate(..) method of
	my formbean (derived from ValidatorForm) and logged out errors.size() which
	turned out to be 0, apparently indicating that my errors Object is empty. I
	further checked the ValidatorForm.validate(..) method of the latest nightly
	build and saw this code...
	
	public ActionErrors validate(ActionMapping mapping,
	 HttpServletRequest request) {
	
	ServletContext application = getServlet().getServletContext();
	ActionErrors errors = new ActionErrors();
	
	Validator validator =
	Resources.initValidator(mapping.getAttribute(),
	 this,
	 application, request,
	 errors, page);
	
	try {
	validatorResults = validator.validate();
	} catch (ValidatorException e) {
	log.error(e.getMessage(), e);
	}
	   
	
	return errors;
	}
	What I don't understand is the errors Object is returned, but I don't see
	when it is filled with the validation results. Is it likely there is a bug
	in here?
	
	
	-Ursprüngliche Nachricht-
	Von: David Graham [mailto:[EMAIL PROTECTED]]
	Gesendet: Freitag, 13. Dezember 2002 18:43
	An: [EMAIL PROTECTED]
	Betreff: Re: Struts validating with beta2 not working
	
	
	You need to tell us exactly what not working means.  Did you replace all
	the jars in WEB_INF/lib with the new ones for beta 2?
	
	David
	
	
	
	
	
	
	From: Kwabla, Bens [EMAIL PROTECTED]
	Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
	To: 'Struts Users Mailing List' [EMAIL PROTECTED]
	Subject: Struts validating with beta2 not working
	Date: Fri, 13 Dec 2002 14:40:30 +0100
	
	Hi All!
	
	I had the client-side validation working under struts version before the
	beta 2. Now my application has been migrated to the beta 2 of struts. Since
	then, my client-side validation is no longer working. I understand the
	validating logic has been adopted into commons. Can some tell me what is
	happening?
	
	Bens Kwabla
	
	-Ursprüngliche Nachricht-
	Von: [EMAIL PROTECTED]
	[mailto:[EMAIL PROTECTED]]
	Gesendet: Freitag, 13. Dezember 2002 14:35
	An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
	Betreff: RE: Re: OptionsCollection
	
	
	Hi,
	There are many ways of doing this.So first is as the collection is being
	displayed on screen,make it an attribute of form and popolate it in action
	on
	form.So in jsp u will access like a form attribute.
	
	But the problem with this approach is If u get an error and forward back
	the
	
	user to same jsp, u loose the collection data as u are directly going to
	the
	
	screen.So the solution could be have a generic action which will be called
	in
	case of errors and the action will populate form with list before
	forwarding
	it
	to same jsp.
	
	Else U can have lazy in itialising forms.i.e forms getList emthod itself
	will
	call service to get data if list is null.And then in this case ,u can just
	use
	an epty action class which does nothing but forwarsd to success which is
	the
	origicnal jsp.But this action will be mapped with the Original actions form
	so
	that the form will use its auto population mechanism to get the list..But i
	dont like this approach ..just not a good design i think.But very
	conveninent.
	
	
	Hope this helps,
	Regards,
	Shirish
	
	-Original Message-
	From: marklowe [mailto:[EMAIL PROTECTED]]
	Sent: Friday, December 13, 2002 12:12 PM
	To: struts-user
	Cc: marklowe
	Subject: Re: OptionsCollection
	
	
	Okay... But a drop down menu is screen data.
	
	And a list of companies is something that will be used more than once.
	
	So I have a normal class in my model layer
	
	ListCompanies
	
	In my UserAction
	
	(ListCompanies).getCompanies();
	
	But this Action's primary job is to return a list of users (which it does).
	
	As the list is screen data i should be defining this in my form bean? This
	is something thats being confusing me for weeks. If i've a bunch of
	collections how can i make them available to iterate tags and select menus,
	without

Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-20 Thread Scott Ryan

David,
Thanks for the great framework for validation.  I have found it
extremely useful and am glad to hear it is becoming
part of struts in the future.  I am working on some deployment and
maintenance issues and wondered if you had any 
suggestions based on your input below.

There are two issues:

1

First is keeping the xml files small and isolated for ease of
maintenance.  I was wondering about creating
a file called validators.xml that includes all the validators that I am
using in a project (Validator definitions and maybe the
javascript to go with it.)

I would then create a file for each form that I am validating that
contains the validation rules for each field.  

I could then create a validation.xml file that included all the above
files (Validator.xml and several formvalidation.xml files).  That would
allow us to work on validation rules for a set of forms independent of
the other forms.

Is this overkill?
How do you actually do an xml include?

2--
We have several non-struts applications and several separate isolated
struts applications.  We have one common javascript validation library
that is 
used for all projects.  If for example we had 2-nonstruts apps and 3
struts apps we would have to deploy 4 copies of the same javascript
code.  One for the 
non-struts apps and 3 for the struts apps since each struts app has a
validation.xml file containing the javascript as part of the file.

The scenario listed above would reduce the duplication to 2 since we
would now need one javascript library for the non-struts apps and one
validator.xml file for
the struts applications.

I sure would like to reduce that duplication to one.
It seems that the static and dynamic jsp references might do the trick
but I must admit I really don't understand it fully yet.  Also we don't
have jsp support for all
of the applications we deploy so it might present a packaging problem
as well.

I would appreciate anyone's input on this issue.  I am just trying to
reduce maint and support costs in the future as we deploy more and more
solutions that are struts based.

Thanks



Scott Ryan
Developer
First Bank Data Corporation
Work: (303) 235-1485
Cell:(303 263-3044

 [EMAIL PROTECTED] 07/18/01 08:07PM 
If you look at the jsType.jsp, you will see that it is
referencing an external JavaScript file called
staticJavascript.jsp.  You could put other JavaScript
methods in that and call them from onclick, etc. 
Although I'm not sure if that is what you mean. 
Otherwise you could do an xml include.  I think the
JavaScript associated with a java method should be
with it in the xml file.

David

--- Scott Ryan [EMAIL PROTECTED] wrote:
 Yes the javascript is being generated.  I think the
 problem is that I
 used the validation.xml that comes with the latest
 release or your
 validator and some of it appears to not be
 compatible with Netscape
 version I am testing with.  Java script has the
 great benefit of failing
 but not indicating where the problem is.  
 
 I stripped out all but the required and mask code
 and it works.  
 
 I can now go through function by funtion and see
 which one is
 incompatible.
 
 Is there any stratgy that would allow you to
 reference javascript that
 is in a library so that we could use some of the
 current javascript
 libraries we have today with out copying the code
 into the
 validation.xml.
 
 My next challenge is to get the generated validation
 to work with the
 formatting javascript I currently have on the page. 
 This is currently
 causing some issues.
 
 Thanks for the help.
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044
 
  [EMAIL PROTECTED] 07/18/01 03:49PM 
 Do you see any JavaScript being generated in the
 html?
 
 David
 
 --- Scott Ryan [EMAIL PROTECTED] wrote:
  I have now converted to the latest version of the
  Validator and that
  caused the server side validation to start working
  but not the javascript client side doesn't work. 
 It
  goes straight to
  the server validation.  I double checked
 everything
  mentioned in the documentation and in the previous
  messages in this
  list and everything appears ok.  The only things
  I think I need is the onsubmit addition and the
  javascript validator
  tag.  
  
  Any more suggestions.
  
  Scott
  
  Scott Ryan
  Developer
  First Bank Data Corporation
  Work: (303) 235-1485
  Cell:(303 263-3044
  
   [EMAIL PROTECTED] 07/18/01 10:06AM 
  The JavaScript part shouldn't have anything to do
  with
  the server side other than it uses the same object
  in
  application scope.  Does the name attribute of
 your
  action (which matches the key the ActionForm is
  stored
  under) in the struts-config.xml the same as the
 form
  element's name attribute?  
  
  actionpath=/registration

 

type=com.wintecinc.struts.example.validator.RegistrationAction
 name=registrationForm
 scope

Re: Server Side Validation not firing for Validator whenJava Script is off

2001-07-19 Thread Calvin Yu


On 18 Jul 2001 16:09:37 -0600, Scott Ryan wrote:
 Java script has the great benefit of failing
 but not indicating where the problem is.  
 

If you're not using this already, you can type 'javascript:' in the
address bar and it'll open the javascript console.

Calvin





RE: Server Side Validation not firing for Validator when Java Script is off

2001-07-19 Thread Jann VanOver

Calvin, 
FYI, your suggestion only works in Netscape -- or at least it doesn't work
in IE. 

-Original Message-
From: Calvin Yu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 3:14 AM
To: [EMAIL PROTECTED]
Subject: Re: Server Side Validation not firing for Validator when Java
Script is off



On 18 Jul 2001 16:09:37 -0600, Scott Ryan wrote:
 Java script has the great benefit of failing
 but not indicating where the problem is.  
 

If you're not using this already, you can type 'javascript:' in the
address bar and it'll open the javascript console.

Calvin




Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan

I am trying to use the Validator extension for struts.   I have the
client side functioning correctly and it works great.  I then go into
Netscape and turn off java script and the server side checking is not
firing.  Am I missing some configuration parameter?  I even tried
calling super.validate from a validate method within my ActionForm and
this returned no information either.  Any ideas on where I can look?

Thanks

Scott Ryan
Developer
First Bank Data Corporation
Work: (303) 235-1485
Cell:(303 263-3044



Re: Server Side Validation not firing for Validator whenJava Script is off

2001-07-18 Thread Ryan Cornia



Are you extending ValidateForm instead of 
ActionForm?

If you have a validate method in your form, be sure to call 
super.validate().

Ryan

 [EMAIL PROTECTED] 07/18/01 08:53AM 
I am trying to use the Validator extension for 
struts. I have theclient side functioning correctly and it works 
great. I then go intoNetscape and turn off java script and the server 
side checking is notfiring. Am I missing some configuration 
parameter? I even triedcalling super.validate from a validate method 
within my ActionForm andthis returned no information either. Any ideas 
on where I can look?ThanksScott RyanDeveloperFirst Bank 
Data CorporationWork: (303) 235-1485Cell: (303 
263-3044


Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan

Yes I am extending ValidatorForm instead of ActionForm.  Did you mean
ValidateForm or ValidatorForm.  

I originally commented out the validate method that I had but after
nothing happened I tried creating a validate method that only called
super.validate with the proper attributes but it returned an empty
errors object.  

It almost appears that I have missed a flag somewhere.  It was easy to
get the client side to work but unlike the rest of the user's I am
having a problem getting the server side to fire correctly.  

I am going to try and remove the onsubmit from my jsp and see if the
server side will fire then.

Thanks for your suggestions.

Scott Ryan
Developer
First Bank Data Corporation
Work: (303) 235-1485
Cell:(303 263-3044

 [EMAIL PROTECTED] 07/18/01 08:50AM 
Are you extending ValidateForm instead of ActionForm?

If you have a validate method in your form, be sure to call
super.validate().

Ryan



 [EMAIL PROTECTED] 07/18/01 08:53AM 
I am trying to use the Validator extension for struts.   I have the
client side functioning correctly and it works great.  I then go into
Netscape and turn off java script and the server side checking is not
firing.  Am I missing some configuration parameter?  I even tried
calling super.validate from a validate method within my ActionForm and
this returned no information either.  Any ideas on where I can look?

Thanks

Scott Ryan
Developer
First Bank Data Corporation
Work: (303) 235-1485
Cell:(303 263-3044



Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread David Winterfeldt

The JavaScript part shouldn't have anything to do with
the server side other than it uses the same object in
application scope.  Does the name attribute of your
action (which matches the key the ActionForm is stored
under) in the struts-config.xml the same as the form
element's name attribute?  

actionpath=/registration
  
type=com.wintecinc.struts.example.validator.RegistrationAction
   name=registrationForm
   scope=request
   validate=true
   input=/registration.jsp
   forward name=success 
path=/index.jsp/
/action

  formname=registrationForm
  /form

David

--- Scott Ryan [EMAIL PROTECTED] wrote:
 Yes I am extending ValidatorForm instead of
 ActionForm.  Did you mean
 ValidateForm or ValidatorForm.  
 
 I originally commented out the validate method that
 I had but after
 nothing happened I tried creating a validate method
 that only called
 super.validate with the proper attributes but it
 returned an empty
 errors object.  
 
 It almost appears that I have missed a flag
 somewhere.  It was easy to
 get the client side to work but unlike the rest of
 the user's I am
 having a problem getting the server side to fire
 correctly.  
 
 I am going to try and remove the onsubmit from my
 jsp and see if the
 server side will fire then.
 
 Thanks for your suggestions.
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044
 
  [EMAIL PROTECTED] 07/18/01 08:50AM 
 Are you extending ValidateForm instead of
 ActionForm?
 
 If you have a validate method in your form, be sure
 to call
 super.validate().
 
 Ryan
 
 
 
  [EMAIL PROTECTED] 07/18/01 08:53AM 
 I am trying to use the Validator extension for
 struts.   I have the
 client side functioning correctly and it works
 great.  I then go into
 Netscape and turn off java script and the server
 side checking is not
 firing.  Am I missing some configuration parameter? 
 I even tried
 calling super.validate from a validate method within
 my ActionForm and
 this returned no information either.  Any ideas on
 where I can look?
 
 Thanks
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan

I located the problem.  It was a combination of two things.  

1) The names in my form  and the validation tag did not match.  I had
two of them matching but all three needed to match.

2) I was using the .5 build which has an imcomplete validation.xml file
and the format has changed since that build.

Once question I have for those developing enterprise applications is
how to managed the validation.xml file.  It seems that is contains
application specific information as well as enterprise specific
information.

It seems that the file contains javascript validation code which could
be used throughout the enterprise on a number of applications. It also
contains validation rules specific to the application that you are
deploying.  It seems that you either have to duplicate the javascript
code to deploy in multiple validation.xml files or you have to include
the validation rules for all applications in every validation.xml file. 
I realize you can cut and paste but this opens up possibilities for
making mistakes.  

Has anyone come up with a way to package the inline javascript so it
can be used in multiple validation.xml files and you only have to change
one file to add additional javascript functions.



Scott Ryan
Developer
First Bank Data Corporation
Work: (303) 235-1485
Cell:(303 263-3044

 [EMAIL PROTECTED] 07/18/01 10:06AM 
The JavaScript part shouldn't have anything to do with
the server side other than it uses the same object in
application scope.  Does the name attribute of your
action (which matches the key the ActionForm is stored
under) in the struts-config.xml the same as the form
element's name attribute?  

actionpath=/registration
  
type=com.wintecinc.struts.example.validator.RegistrationAction
   name=registrationForm
   scope=request
   validate=true
   input=/registration.jsp
   forward name=success 
path=/index.jsp/
/action

  formname=registrationForm
  /form

David

--- Scott Ryan [EMAIL PROTECTED] wrote:
 Yes I am extending ValidatorForm instead of
 ActionForm.  Did you mean
 ValidateForm or ValidatorForm.  
 
 I originally commented out the validate method that
 I had but after
 nothing happened I tried creating a validate method
 that only called
 super.validate with the proper attributes but it
 returned an empty
 errors object.  
 
 It almost appears that I have missed a flag
 somewhere.  It was easy to
 get the client side to work but unlike the rest of
 the user's I am
 having a problem getting the server side to fire
 correctly.  
 
 I am going to try and remove the onsubmit from my
 jsp and see if the
 server side will fire then.
 
 Thanks for your suggestions.
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044
 
  [EMAIL PROTECTED] 07/18/01 08:50AM 
 Are you extending ValidateForm instead of
 ActionForm?
 
 If you have a validate method in your form, be sure
 to call
 super.validate().
 
 Ryan
 
 
 
  [EMAIL PROTECTED] 07/18/01 08:53AM 
 I am trying to use the Validator extension for
 struts.   I have the
 client side functioning correctly and it works
 great.  I then go into
 Netscape and turn off java script and the server
 side checking is not
 firing.  Am I missing some configuration parameter? 
 I even tried
 calling super.validate from a validate method within
 my ActionForm and
 this returned no information either.  Any ideas on
 where I can look?
 
 Thanks
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan

I have now converted to the latest version of the Validator and that
caused the server side validation to start working
but not the javascript client side doesn't work.  It goes straight to
the server validation.  I double checked everything
mentioned in the documentation and in the previous messages in this
list and everything appears ok.  The only things
I think I need is the onsubmit addition and the javascript validator
tag.  

Any more suggestions.

Scott

Scott Ryan
Developer
First Bank Data Corporation
Work: (303) 235-1485
Cell:(303 263-3044

 [EMAIL PROTECTED] 07/18/01 10:06AM 
The JavaScript part shouldn't have anything to do with
the server side other than it uses the same object in
application scope.  Does the name attribute of your
action (which matches the key the ActionForm is stored
under) in the struts-config.xml the same as the form
element's name attribute?  

actionpath=/registration
  
type=com.wintecinc.struts.example.validator.RegistrationAction
   name=registrationForm
   scope=request
   validate=true
   input=/registration.jsp
   forward name=success 
path=/index.jsp/
/action

  formname=registrationForm
  /form

David

--- Scott Ryan [EMAIL PROTECTED] wrote:
 Yes I am extending ValidatorForm instead of
 ActionForm.  Did you mean
 ValidateForm or ValidatorForm.  
 
 I originally commented out the validate method that
 I had but after
 nothing happened I tried creating a validate method
 that only called
 super.validate with the proper attributes but it
 returned an empty
 errors object.  
 
 It almost appears that I have missed a flag
 somewhere.  It was easy to
 get the client side to work but unlike the rest of
 the user's I am
 having a problem getting the server side to fire
 correctly.  
 
 I am going to try and remove the onsubmit from my
 jsp and see if the
 server side will fire then.
 
 Thanks for your suggestions.
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044
 
  [EMAIL PROTECTED] 07/18/01 08:50AM 
 Are you extending ValidateForm instead of
 ActionForm?
 
 If you have a validate method in your form, be sure
 to call
 super.validate().
 
 Ryan
 
 
 
  [EMAIL PROTECTED] 07/18/01 08:53AM 
 I am trying to use the Validator extension for
 struts.   I have the
 client side functioning correctly and it works
 great.  I then go into
 Netscape and turn off java script and the server
 side checking is not
 firing.  Am I missing some configuration parameter? 
 I even tried
 calling super.validate from a validate method within
 my ActionForm and
 this returned no information either.  Any ideas on
 where I can look?
 
 Thanks
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread David Winterfeldt

Do you see any JavaScript being generated in the html?

David

--- Scott Ryan [EMAIL PROTECTED] wrote:
 I have now converted to the latest version of the
 Validator and that
 caused the server side validation to start working
 but not the javascript client side doesn't work.  It
 goes straight to
 the server validation.  I double checked everything
 mentioned in the documentation and in the previous
 messages in this
 list and everything appears ok.  The only things
 I think I need is the onsubmit addition and the
 javascript validator
 tag.  
 
 Any more suggestions.
 
 Scott
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044
 
  [EMAIL PROTECTED] 07/18/01 10:06AM 
 The JavaScript part shouldn't have anything to do
 with
 the server side other than it uses the same object
 in
 application scope.  Does the name attribute of your
 action (which matches the key the ActionForm is
 stored
 under) in the struts-config.xml the same as the form
 element's name attribute?  
 
 actionpath=/registration
   

type=com.wintecinc.struts.example.validator.RegistrationAction
name=registrationForm
scope=request
validate=true
input=/registration.jsp
forward name=success 
 path=/index.jsp/
 /action
 
   formname=registrationForm
   /form
 
 David
 
 --- Scott Ryan [EMAIL PROTECTED] wrote:
  Yes I am extending ValidatorForm instead of
  ActionForm.  Did you mean
  ValidateForm or ValidatorForm.  
  
  I originally commented out the validate method
 that
  I had but after
  nothing happened I tried creating a validate
 method
  that only called
  super.validate with the proper attributes but it
  returned an empty
  errors object.  
  
  It almost appears that I have missed a flag
  somewhere.  It was easy to
  get the client side to work but unlike the rest of
  the user's I am
  having a problem getting the server side to fire
  correctly.  
  
  I am going to try and remove the onsubmit from my
  jsp and see if the
  server side will fire then.
  
  Thanks for your suggestions.
  
  Scott Ryan
  Developer
  First Bank Data Corporation
  Work: (303) 235-1485
  Cell:(303 263-3044
  
   [EMAIL PROTECTED] 07/18/01 08:50AM 
  Are you extending ValidateForm instead of
  ActionForm?
  
  If you have a validate method in your form, be
 sure
  to call
  super.validate().
  
  Ryan
  
  
  
   [EMAIL PROTECTED] 07/18/01 08:53AM 
  I am trying to use the Validator extension for
  struts.   I have the
  client side functioning correctly and it works
  great.  I then go into
  Netscape and turn off java script and the server
  side checking is not
  firing.  Am I missing some configuration
 parameter? 
  I even tried
  calling super.validate from a validate method
 within
  my ActionForm and
  this returned no information either.  Any ideas on
  where I can look?
  
  Thanks
  
  Scott Ryan
  Developer
  First Bank Data Corporation
  Work: (303) 235-1485
  Cell:(303 263-3044
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread Scott Ryan

Yes the javascript is being generated.  I think the problem is that I
used the validation.xml that comes with the latest release or your
validator and some of it appears to not be compatible with Netscape
version I am testing with.  Java script has the great benefit of failing
but not indicating where the problem is.  

I stripped out all but the required and mask code and it works.  

I can now go through function by funtion and see which one is
incompatible.

Is there any stratgy that would allow you to reference javascript that
is in a library so that we could use some of the current javascript
libraries we have today with out copying the code into the
validation.xml.

My next challenge is to get the generated validation to work with the
formatting javascript I currently have on the page.  This is currently
causing some issues.

Thanks for the help.

Scott Ryan
Developer
First Bank Data Corporation
Work: (303) 235-1485
Cell:(303 263-3044

 [EMAIL PROTECTED] 07/18/01 03:49PM 
Do you see any JavaScript being generated in the html?

David

--- Scott Ryan [EMAIL PROTECTED] wrote:
 I have now converted to the latest version of the
 Validator and that
 caused the server side validation to start working
 but not the javascript client side doesn't work.  It
 goes straight to
 the server validation.  I double checked everything
 mentioned in the documentation and in the previous
 messages in this
 list and everything appears ok.  The only things
 I think I need is the onsubmit addition and the
 javascript validator
 tag.  
 
 Any more suggestions.
 
 Scott
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044
 
  [EMAIL PROTECTED] 07/18/01 10:06AM 
 The JavaScript part shouldn't have anything to do
 with
 the server side other than it uses the same object
 in
 application scope.  Does the name attribute of your
 action (which matches the key the ActionForm is
 stored
 under) in the struts-config.xml the same as the form
 element's name attribute?  
 
 actionpath=/registration
   

type=com.wintecinc.struts.example.validator.RegistrationAction
name=registrationForm
scope=request
validate=true
input=/registration.jsp
forward name=success 
 path=/index.jsp/
 /action
 
   formname=registrationForm
   /form
 
 David
 
 --- Scott Ryan [EMAIL PROTECTED] wrote:
  Yes I am extending ValidatorForm instead of
  ActionForm.  Did you mean
  ValidateForm or ValidatorForm.  
  
  I originally commented out the validate method
 that
  I had but after
  nothing happened I tried creating a validate
 method
  that only called
  super.validate with the proper attributes but it
  returned an empty
  errors object.  
  
  It almost appears that I have missed a flag
  somewhere.  It was easy to
  get the client side to work but unlike the rest of
  the user's I am
  having a problem getting the server side to fire
  correctly.  
  
  I am going to try and remove the onsubmit from my
  jsp and see if the
  server side will fire then.
  
  Thanks for your suggestions.
  
  Scott Ryan
  Developer
  First Bank Data Corporation
  Work: (303) 235-1485
  Cell:(303 263-3044
  
   [EMAIL PROTECTED] 07/18/01 08:50AM 
  Are you extending ValidateForm instead of
  ActionForm?
  
  If you have a validate method in your form, be
 sure
  to call
  super.validate().
  
  Ryan
  
  
  
   [EMAIL PROTECTED] 07/18/01 08:53AM 
  I am trying to use the Validator extension for
  struts.   I have the
  client side functioning correctly and it works
  great.  I then go into
  Netscape and turn off java script and the server
  side checking is not
  firing.  Am I missing some configuration
 parameter? 
  I even tried
  calling super.validate from a validate method
 within
  my ActionForm and
  this returned no information either.  Any ideas on
  where I can look?
  
  Thanks
  
  Scott Ryan
  Developer
  First Bank Data Corporation
  Work: (303) 235-1485
  Cell:(303 263-3044
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/ 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Server Side Validation not firing for Validator when Java Script is off

2001-07-18 Thread David Winterfeldt

If you look at the jsType.jsp, you will see that it is
referencing an external JavaScript file called
staticJavascript.jsp.  You could put other JavaScript
methods in that and call them from onclick, etc. 
Although I'm not sure if that is what you mean. 
Otherwise you could do an xml include.  I think the
JavaScript associated with a java method should be
with it in the xml file.

David

--- Scott Ryan [EMAIL PROTECTED] wrote:
 Yes the javascript is being generated.  I think the
 problem is that I
 used the validation.xml that comes with the latest
 release or your
 validator and some of it appears to not be
 compatible with Netscape
 version I am testing with.  Java script has the
 great benefit of failing
 but not indicating where the problem is.  
 
 I stripped out all but the required and mask code
 and it works.  
 
 I can now go through function by funtion and see
 which one is
 incompatible.
 
 Is there any stratgy that would allow you to
 reference javascript that
 is in a library so that we could use some of the
 current javascript
 libraries we have today with out copying the code
 into the
 validation.xml.
 
 My next challenge is to get the generated validation
 to work with the
 formatting javascript I currently have on the page. 
 This is currently
 causing some issues.
 
 Thanks for the help.
 
 Scott Ryan
 Developer
 First Bank Data Corporation
 Work: (303) 235-1485
 Cell:(303 263-3044
 
  [EMAIL PROTECTED] 07/18/01 03:49PM 
 Do you see any JavaScript being generated in the
 html?
 
 David
 
 --- Scott Ryan [EMAIL PROTECTED] wrote:
  I have now converted to the latest version of the
  Validator and that
  caused the server side validation to start working
  but not the javascript client side doesn't work. 
 It
  goes straight to
  the server validation.  I double checked
 everything
  mentioned in the documentation and in the previous
  messages in this
  list and everything appears ok.  The only things
  I think I need is the onsubmit addition and the
  javascript validator
  tag.  
  
  Any more suggestions.
  
  Scott
  
  Scott Ryan
  Developer
  First Bank Data Corporation
  Work: (303) 235-1485
  Cell:(303 263-3044
  
   [EMAIL PROTECTED] 07/18/01 10:06AM 
  The JavaScript part shouldn't have anything to do
  with
  the server side other than it uses the same object
  in
  application scope.  Does the name attribute of
 your
  action (which matches the key the ActionForm is
  stored
  under) in the struts-config.xml the same as the
 form
  element's name attribute?  
  
  actionpath=/registration

 

type=com.wintecinc.struts.example.validator.RegistrationAction
 name=registrationForm
 scope=request
 validate=true
 input=/registration.jsp
 forward name=success 
  path=/index.jsp/
  /action
  
formname=registrationForm
/form
  
  David
  
  --- Scott Ryan [EMAIL PROTECTED] wrote:
   Yes I am extending ValidatorForm instead of
   ActionForm.  Did you mean
   ValidateForm or ValidatorForm.  
   
   I originally commented out the validate method
  that
   I had but after
   nothing happened I tried creating a validate
  method
   that only called
   super.validate with the proper attributes but it
   returned an empty
   errors object.  
   
   It almost appears that I have missed a flag
   somewhere.  It was easy to
   get the client side to work but unlike the rest
 of
   the user's I am
   having a problem getting the server side to fire
   correctly.  
   
   I am going to try and remove the onsubmit from
 my
   jsp and see if the
   server side will fire then.
   
   Thanks for your suggestions.
   
   Scott Ryan
   Developer
   First Bank Data Corporation
   Work: (303) 235-1485
   Cell:(303 263-3044
   
[EMAIL PROTECTED] 07/18/01 08:50AM
 
   Are you extending ValidateForm instead of
   ActionForm?
   
   If you have a validate method in your form, be
  sure
   to call
   super.validate().
   
   Ryan
   
   
   
[EMAIL PROTECTED] 07/18/01 08:53AM
 
   I am trying to use the Validator extension for
   struts.   I have the
   client side functioning correctly and it works
   great.  I then go into
   Netscape and turn off java script and the server
   side checking is not
   firing.  Am I missing some configuration
  parameter? 
   I even tried
   calling super.validate from a validate method
  within
   my ActionForm and
   this returned no information either.  Any ideas
 on
   where I can look?
   
   Thanks
   
   Scott Ryan
   Developer
   First Bank Data Corporation
   Work: (303) 235-1485
   Cell:(303 263-3044
  
  
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail
  http://personal.mail.yahoo.com/ 
 
 
 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com

Client/Server Side Validation for Struts 1.1

2001-06-02 Thread David Winterfeldt

I'd like to get a discussion started on the
client/standard validations for Struts 1.1.  I thought
it would be good to talk about what basic features it
would include and implementation.  Here are the
descriptions from the To Do list for 1.1.

Standard Validations. 
Add the ability to configure standard validations on
particular properties to be enforced by the controller
servlet automatically. Where feasible, client-side
JavaScript validations may also be generated based on
the same configuration rules. 

Client Side Validation. 
Add the ability to automatically generate optional
JavaScript code to perform client-side validations for
things like required fields, numeric fields,
dates/times/timestamps, and so on. The required
validation should mesh with validation enhancements
provided in the controller servlet itself.

Nic Hobbs and I have both volunteered for the Standard
(Server Side) Validations and Ted Husted, Nic Hobbs,
Spencer Smith and I have volunteered for the Client
Validations (JavaScript).  Ted has been using a
validation framework I've done on a project (I'm not
sure what version).  It lets you define your
validation rules in an xml file.  It supports
internationalized rules for a form and
internationalized messages.  It has basic support for
creating JavaScript methods that can do what a server
side method does. The code, documentation, and example
webapps are posted here.  And of course Struts is
welcome to the source code if everyone thinks that
what I've done so far is good foundation to start on.
http://home.earthlink.net/~dwinterfeldt/

If any of the other volunteers have started something,
I'd like to see it and I'm sure everyone has ideas for
the design.  I'd go into more detail about everything
I've done, but it is probably easier for anyone
interested to go to my site and read the documentation
and javadocs posted there.

David Winterfeldt
http://home.earthlink.net/~dwinterfeldt/

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/