RE: [SOLVED] Struts Validator prints all javascript functions

2004-03-17 Thread Kunal H. Parikh
Hi All!

After some debugging, I worked out that there are two variables
dynamicJavaScript and staticJavaScript in the JavascriptValidatorTag
class.

By default, their values are true. And Hence, the staticJavaScript also
gets included in the response.

i.e. to only display relevant JS methods, your html:javascript tag should
look like,


html:javascript formName=myformName dynamicJavascript=true
staticJavascript=false /


cheers,

kunal


-Original Message-
From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] 
Sent: Monday, 15 March 2004 08:55
To: 'Struts Users Mailing List'
Subject: Struts Validator prints all javascript functions

Hi All!

I am attempting to use Struts Validator.

All works well, but I am only using the required validation in my code.

However, the JavaScript that gets generated, include other functions like
checkEmail, minLength, etc. etc.

Is this expected behaviour?

My code (FYI):
===
html:form name=vehicleEnquiry action=/vehicleEnquiry.do method=post
type=org.apache.struts.validator.DynaValidatorActionForm onsubmit=return(
validateVehicleEnquiry(this) );  



tr
tdbean:message key=label.name /:/td
td html:text property=name value= / /td
/tr


html:submit value=Send Enquiry /
/html:form
html:javascript formName=vehicleEnquiry /
==

TIA,

Kunal



-
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: [SOLVED] Struts Validator prints all javascript functions

2004-03-17 Thread Kunal H. Parikh
Whoops . that didn't quite solve the problem . the real
javascript methods are not quite being appended to the response .

My apologies!



-Original Message-
From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 18 March 2004 12:11
To: 'Struts Users Mailing List'
Cc: 'Joe Germuska'; 'Theodosios Paschalidis'
Subject: RE: [SOLVED] Struts Validator prints all javascript functions 

Hi All!

After some debugging, I worked out that there are two variables
dynamicJavaScript and staticJavaScript in the JavascriptValidatorTag
class.

By default, their values are true. And Hence, the staticJavaScript also
gets included in the response.

i.e. to only display relevant JS methods, your html:javascript tag should
look like,


html:javascript formName=myformName dynamicJavascript=true
staticJavascript=false /


cheers,

kunal


-Original Message-
From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] 
Sent: Monday, 15 March 2004 08:55
To: 'Struts Users Mailing List'
Subject: Struts Validator prints all javascript functions

Hi All!

I am attempting to use Struts Validator.

All works well, but I am only using the required validation in my code.

However, the JavaScript that gets generated, include other functions like
checkEmail, minLength, etc. etc.

Is this expected behaviour?

My code (FYI):
===
html:form name=vehicleEnquiry action=/vehicleEnquiry.do method=post
type=org.apache.struts.validator.DynaValidatorActionForm onsubmit=return(
validateVehicleEnquiry(this) );  



tr
tdbean:message key=label.name /:/td
td html:text property=name value= / /td
/tr


html:submit value=Send Enquiry /
/html:form
html:javascript formName=vehicleEnquiry /
==

TIA,

Kunal



-
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: Struts Validator prints all javascript functions

2004-03-15 Thread Kunal H. Parikh
Hi Guys !

Does anyone think that this could be happening because I am using Tiles ?


Kunal

-Original Message-
From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] 
Sent: Monday, 15 March 2004 10:12
To: 'Struts Users Mailing List'
Subject: RE: Struts Validator prints all javascript functions

I thought so too!

My struts-config.xml reads as follows
==
...
form-bean name=vehicleEnquiry
type=org.apache.struts.validator.DynaValidatorActionForm
form-property name=vehicleId
type=java.lang.Integer /
form-property name=fullName
type=java.lang.String /
/form-bean
...
=

Do you think DynaValidatorActionForm could be creating the problem ?


Kunal

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Marino A. Jonsson
Sent: Monday, 15 March 2004 10:07
To: [EMAIL PROTECTED]
Subject: Re: Struts Validator prints all javascript functions

hmm ... that's not my experience - the dynamic parts are rendered as they
should, but all the static javascript is then rendered too (instead of just
the relevant static methods).  I haven't tested 1.2 though.

Marino

Joe Germuska [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 At 8:55 AM +1100 3/15/04, Kunal H. Parikh wrote:
 Hi All!
 
 I am attempting to use Struts Validator.
 
 All works well, but I am only using the required validation in my code.
 
 However, the JavaScript that gets generated, include other functions like
 checkEmail, minLength, etc. etc.
 
 Is this expected behaviour?

 This is what happens when the formName you specify in the
 html:javascript tag is not found by the validator.

 Since Struts 1.2.0 (and a little before in the nightlies, of course),
 this condition causes a JSPException to be thrown instead.

 Joe


 -- 
 Joe Germuska
 [EMAIL PROTECTED]
 http://blog.germuska.com
Imagine if every Thursday your shoes exploded if you tied them
 the usual way.  This happens to us all the time with computers, and
 nobody thinks of complaining.
  -- Jef Raskin




-
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: Struts Validator prints all javascript functions

2004-03-15 Thread Theodosios Paschalidis
Hi Kunal,

I do not use Tiles nor the DynaValidator but I get the same in a certain
Form. I use Struts 1.1

Theo

- Original Message - 
From: Kunal H. Parikh [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Monday, March 15, 2004 9:38 PM
Subject: RE: Struts Validator prints all javascript functions


Hi Guys !

Does anyone think that this could be happening because I am using Tiles ?


Kunal

-Original Message-
From: Kunal H. Parikh [mailto:[EMAIL PROTECTED]
Sent: Monday, 15 March 2004 10:12
To: 'Struts Users Mailing List'
Subject: RE: Struts Validator prints all javascript functions

I thought so too!

My struts-config.xml reads as follows
==
..
form-bean name=vehicleEnquiry
type=org.apache.struts.validator.DynaValidatorActionForm
form-property name=vehicleId
type=java.lang.Integer /
form-property name=fullName
type=java.lang.String /
/form-bean
..
=

Do you think DynaValidatorActionForm could be creating the problem ?


Kunal

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Marino A. Jonsson
Sent: Monday, 15 March 2004 10:07
To: [EMAIL PROTECTED]
Subject: Re: Struts Validator prints all javascript functions

hmm ... that's not my experience - the dynamic parts are rendered as they
should, but all the static javascript is then rendered too (instead of just
the relevant static methods).  I haven't tested 1.2 though.

Marino

Joe Germuska [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 At 8:55 AM +1100 3/15/04, Kunal H. Parikh wrote:
 Hi All!
 
 I am attempting to use Struts Validator.
 
 All works well, but I am only using the required validation in my code.
 
 However, the JavaScript that gets generated, include other functions like
 checkEmail, minLength, etc. etc.
 
 Is this expected behaviour?

 This is what happens when the formName you specify in the
 html:javascript tag is not found by the validator.

 Since Struts 1.2.0 (and a little before in the nightlies, of course),
 this condition causes a JSPException to be thrown instead.

 Joe


 -- 
 Joe Germuska
 [EMAIL PROTECTED]
 http://blog.germuska.com
Imagine if every Thursday your shoes exploded if you tied them
 the usual way.  This happens to us all the time with computers, and
 nobody thinks of complaining.
  -- Jef Raskin




-
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 Validator prints all javascript functions

2004-03-14 Thread Kunal H. Parikh
Hi All!

I am attempting to use Struts Validator.

All works well, but I am only using the required validation in my code.

However, the JavaScript that gets generated, include other functions like
checkEmail, minLength, etc. etc.

Is this expected behaviour?

My code (FYI):
===
html:form name=vehicleEnquiry action=/vehicleEnquiry.do method=post
type=org.apache.struts.validator.DynaValidatorActionForm onsubmit=return(
validateVehicleEnquiry(this) );  



tr
tdbean:message key=label.name /:/td
td html:text property=name value= / /td
/tr


html:submit value=Send Enquiry /
/html:form
html:javascript formName=vehicleEnquiry /
==

TIA,

Kunal



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



Re: Struts Validator prints all javascript functions

2004-03-14 Thread Joe Germuska
At 8:55 AM +1100 3/15/04, Kunal H. Parikh wrote:
Hi All!

I am attempting to use Struts Validator.

All works well, but I am only using the required validation in my code.

However, the JavaScript that gets generated, include other functions like
checkEmail, minLength, etc. etc.
Is this expected behaviour?
This is what happens when the formName you specify in the 
html:javascript tag is not found by the validator.

Since Struts 1.2.0 (and a little before in the nightlies, of course), 
this condition causes a JSPException to be thrown instead.

Joe

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining.
-- Jef Raskin

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


Re: Struts Validator prints all javascript functions

2004-03-14 Thread Marino A. Jonsson
hmm ... that's not my experience - the dynamic parts are rendered as they
should, but all the static javascript is then rendered too (instead of just
the relevant static methods).  I haven't tested 1.2 though.

Marino

Joe Germuska [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 At 8:55 AM +1100 3/15/04, Kunal H. Parikh wrote:
 Hi All!
 
 I am attempting to use Struts Validator.
 
 All works well, but I am only using the required validation in my code.
 
 However, the JavaScript that gets generated, include other functions like
 checkEmail, minLength, etc. etc.
 
 Is this expected behaviour?

 This is what happens when the formName you specify in the
 html:javascript tag is not found by the validator.

 Since Struts 1.2.0 (and a little before in the nightlies, of course),
 this condition causes a JSPException to be thrown instead.

 Joe


 -- 
 Joe Germuska
 [EMAIL PROTECTED]
 http://blog.germuska.com
Imagine if every Thursday your shoes exploded if you tied them
 the usual way.  This happens to us all the time with computers, and
 nobody thinks of complaining.
  -- Jef Raskin




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



RE: Struts Validator prints all javascript functions

2004-03-14 Thread Kunal H. Parikh
I thought so too!

My struts-config.xml reads as follows
==
...
form-bean name=vehicleEnquiry
type=org.apache.struts.validator.DynaValidatorActionForm
form-property name=vehicleId
type=java.lang.Integer /
form-property name=fullName
type=java.lang.String /
/form-bean
...
=

Do you think DynaValidatorActionForm could be creating the problem ?


Kunal

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Marino A. Jonsson
Sent: Monday, 15 March 2004 10:07
To: [EMAIL PROTECTED]
Subject: Re: Struts Validator prints all javascript functions

hmm ... that's not my experience - the dynamic parts are rendered as they
should, but all the static javascript is then rendered too (instead of just
the relevant static methods).  I haven't tested 1.2 though.

Marino

Joe Germuska [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 At 8:55 AM +1100 3/15/04, Kunal H. Parikh wrote:
 Hi All!
 
 I am attempting to use Struts Validator.
 
 All works well, but I am only using the required validation in my code.
 
 However, the JavaScript that gets generated, include other functions like
 checkEmail, minLength, etc. etc.
 
 Is this expected behaviour?

 This is what happens when the formName you specify in the
 html:javascript tag is not found by the validator.

 Since Struts 1.2.0 (and a little before in the nightlies, of course),
 this condition causes a JSPException to be thrown instead.

 Joe


 -- 
 Joe Germuska
 [EMAIL PROTECTED]
 http://blog.germuska.com
Imagine if every Thursday your shoes exploded if you tied them
 the usual way.  This happens to us all the time with computers, and
 nobody thinks of complaining.
  -- Jef Raskin




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