Adam
On 04/06/2004 11:40 AM [EMAIL PROTECTED] wrote:
Hi
The problem is as follows :
In your .jsp you add :
<html:javascript formName="formA" staticJavascript="false"/>
and then you declare your form :
<html:form action="something" onsubmit="return validateFormA(this)" .. </html:form>
When this gets generated it has somthing like this :
<script type="text/javascript" language="Javascript1.1">
<!-- Begin
var bCancel = false;
function validateRegfinnPersonForm(form) {
if (bCancel) return true; else var formValidationResult;
formValidationResult = validateRequired(form) &&
validateMask(form); return (formValidationResult == 1);
}
function formA_required () { this.a0 = new Array("name", "Name is required", new Function
("varName", "this.mask=/^[a-zA-Z -æøåÆØÅ%]*$/; return
this[varName];"));
this.a1 = new Array("address", "Address is required", new Function
("varName", "this.mask=/^[a-zA-Z -æøåÆØÅ%]*$/; return
this[varName];"));
}
//End --> </script>
Now when the validation routine is run, it expects to find required - NOT formA_required. This shows up as a popup script error stating "required is undefined"
Hermod
-----Opprinnelig melding----- Fra: Adam Hardy [mailto:[EMAIL PROTECTED] Sendt: 6. april 2004 10:42 Til: Struts Users Mailing List Emne: Re: SV: validation with struts 1.2
If these things are not already logged as bugs, then the quickest way to
a solution is to put together a very basic test case displaying the bug and open a new bug on bugzilla.
Actually, that's not the quickest - the quickest way is to look at the source code and to write a patch and submit that to bugzilla.
Anyway, with the bundles issue, what is the problem? Mine works fine.
With the 2nd issue to do with prefixing methods with formnames, I also don't understand. Which methods? In Javascript? And which routines?
Regards Adam
On 04/06/2004 09:25 AM [EMAIL PROTECTED] wrote:
Hi
Not as far as I know
Hermod
-----Opprinnelig melding----- Fra: Otto, Frank [mailto:[EMAIL PROTECTED] Sendt: 6. april 2004 09:24 Til: 'Struts Users Mailing List' Emne: AW: validation with struts 1.2
And is there any solution?
-----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 6. April 2004 08:53 An: [EMAIL PROTECTED] Betreff: SV: validation with struts 1.2
Hi
So now we know of two problems with it :)
1. Bundles don't work 2. It prefixes the methods with the formname, but the validation routines don't not know this.
Hemrod
-----Opprinnelig melding----- Fra: Otto, Frank [mailto:[EMAIL PROTECTED] Sendt: 6. april 2004 08:50 Til: 'Struts Users Mailing List' Emne: AW: validation with struts 1.2
It doesn't search the message text in this bundle. It was been
ignored.
-----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 6. April 2004 08:44 An: [EMAIL PROTECTED] Betreff: SV: validation with struts 1.2
Hi
And what excactly is the problem ?
Hermod
-----Opprinnelig melding----- Fra: Otto, Frank [mailto:[EMAIL PROTECTED] Sendt: 6. april 2004 08:42 Til: Struts-User (E-Mail) Emne: validation with struts 1.2
Hi,
i have downloaded struts 1.2. It contains a new
commons-validation.jar.
This supported the bundle attribute of the msg element. But it
doesnt't
function.
Does someone use this kind of validation?
Regards,
Frank
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* *
This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that DnB NOR
cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email.
This email message has been virus checked by the virus programs used in the DnB NOR Group.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* *
--------------------------------------------------------------------- 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.2 + tomcat 5.0.19 + java 1.4.2 Linux 2.4.20 Debian
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]