RE: CForms 2.1 javascript validation not working

2009-07-18 Thread Gary Larsen
:23 AM To: users@cocoon.apache.org Subject: Re: CForms 2.1 javascript validation not working Hello I use cocoon-2.2.0 and do my validation like this: var success=true; if (some-test) {widget.setValidationError(new

Re: CForms 2.1 javascript validation not working

2009-07-12 Thread Barbara Slupik
and in my flow I have: form.load(my-data); form.showForm("my-form"); if (form.isValid) { form.save(my-data); ... } Barbara On 11 Jul, 2009, at 2:42 pm, Gary Larsen wrote: Hi, For some reason javascript validation stopped working o

CForms 2.1 javascript validation not working

2009-07-11 Thread Gary Larsen
Hi, For some reason javascript validation stopped working on all forms (2.1.9): cocoon.log.error("test validation: return false"); return false; The validation is fired on a submit widget yet t

Re: Widget javascript validation problem

2006-07-05 Thread Andrew Madu
Gary,if(!/^[0-9]{16}$/.test(account_no.value)) { //This is invalid } will match an account number with no spaces.many thanks for that heads up. All is working a treat now.regardsAndrew

RE: Widget javascript validation problem

2006-07-05 Thread Stewart, Gary
-Original Message- From: Andrew Madu [mailto:[EMAIL PROTECTED] Sent: 05 July 2006 13:13 To: users@cocoon.apache.org Subject: Re: Widget javascript validation problem > The other problem I am having is with the widget datatype definition for > account_no: > > fd:datatype b

Re: Widget javascript validation problem

2006-07-05 Thread Andrew Madu
Gary,At a glance it looks like *account_no.setValidationError* is wrong as you declared the variable as *accountNumberLength*. This is why I like strict type checking. that now works fine now. I remember having done the same mistake a while ago, and was trying to chek against the actual widget id I

RE: Widget javascript validation problem

2006-07-05 Thread Stewart, Gary
-Original Message- From: Andrew Madu [mailto:[EMAIL PROTECTED] Sent: 05 July 2006 12:31 To: users@cocoon.apache.org Subject: Widget javascript validation problem > > >var success = true; >var creditCardType = widget.lookupWidget("credi

Widget javascript validation problem

2006-07-05 Thread Andrew Madu
Hi,I am having an issue with a widget form validation under cocoon 2.1.8. Basically what I have is a selection box with various credit card types, (visa, matercard...) etc, and based on the card selected a check is done on the credit card number field to make sure that the number of digits entered

Re: CForms Javascript Validation

2006-02-14 Thread Kris Schneider
be working. I looked at the sample files > and could only find Javascript validation for the whole form. Is it possible > to do something like: > > > Foo: > > > >return false; >

Re: CForms Javascript Validation

2006-02-14 Thread Robin Wyles
eem to be working. I looked at the sample files and could only find Javascript validation for the whole form. Is it possible to do something like: Foo: return false;

CForms Javascript Validation

2006-02-14 Thread Stewart, Gary
Hello, I'm using Cocoon 2.1.8 and attempting to develop a few CForms. I've been working on validating the forms and for some widgets I'm attempting to use Javascript but it doesn't seem to be working. I looked at the sample files and could only find Javascript validation fo

Re: javascript validation

2004-12-21 Thread Luca Garulli
:56:54 +0100, oceatoon <[EMAIL PROTECTED]> wrote: > > Ben Anderson wrote: > > > > > Does cocoon have the ability to generate javascript validation for me? > > > I thought it did, but I can't the documentation anywhere and don't > > > see anyt

Re: javascript validation

2004-12-20 Thread Ben Anderson
es to validate that it is a number): Your age: -Ben On Sat, 18 Dec 2004 12:56:54 +0100, oceatoon <[EMAIL PROTECTED]> wrote: > Ben Anderson wrote: > > > Does cocoon have the ability to generate javascript validation for me? >

Re: javascript validation

2004-12-18 Thread oceatoon
Ben Anderson wrote: > Does cocoon have the ability to generate javascript validation for me? > I thought it did, but I can't the documentation anywhere and don't > see anything in the samples. > Thanks, > Ben If you mean client side validation, check t

javascript validation

2004-12-17 Thread Ben Anderson
Does cocoon have the ability to generate javascript validation for me? I thought it did, but I can't the documentation anywhere and don't see anything in the samples. Thanks, Ben - To unsubscribe, e-mail: [EMAIL PROT

cforms javascript validation

2004-11-24 Thread Joose Vettenranta
Hello, when form is loaded and data inputted in valid way -> OK when form is loaded and phone or email field is left missing -> comes a failure page OK when only phone is entered -> comes a failure page ERROR when only email is enetered -> validates OK when both are defined -> validates OK so why

Re: cforms + javascript validation + i18n [solution]

2004-08-11 Thread Phil Snowdon
Don't need any modification to source. You can use: ValidationError err = new ValidationError(new I18nMessage("msg.key", "catalogue")); this uses the ValidationError(XMLizable) constructor in the class you mention. >>> [EMAIL PROTECTED] 12/08/2004 1:47:06 a.m. >>> Seems like src\blocks\forms

Re: cforms + javascript validation + i18n [solution]

2004-08-11 Thread Joose Vettenranta
Seems like src\blocks\forms\java\org\apache\cocoon\forms\validation\ValidationError .java has to be changed to accept catalogue with it, so it can work. public ValidationError(String errorMessageKey, String catalogue) { this.saxFragment = new I18nMessage(errorMessageKey, catalogue);

Re: cforms + javascript validation + i18n

2004-08-11 Thread Joose Vettenranta
Additional information: if false -> true, it does i18n -message.. but how do I define catalogue which it uses? I would like to leave default forms message in one place and custom stuff in another.. - Joose 11.8.2004 kello 15:50, Joose Vettenranta kirjoitti: Hi, I have like if (ema

cforms + javascript validation + i18n

2004-08-11 Thread Joose Vettenranta
Hi, I have like if (email.value == null && phone.value == null) { email.setValidationError(new Packages.org.apache.cocoon.forms.validation.ValidationError("Atleast another one", false)); and it works.. But how can I make that i18n-capable? so it will be translated

Re: [CForm] javascript validation doesn't work? [WORKING]

2004-08-04 Thread Mark Lundquist
On Aug 4, 2004, at 3:40 PM, Phil Snowdon wrote: I've got the validation working now. Thought I'd share the results and ask a question on style. Both examples work, but as a matter of best practice, which would be preferred? Also which would be more likely to remain in future cocoon releases? I'm

Re: [CForm] javascript validation doesn't work? [WORKING]

2004-08-04 Thread Phil Snowdon
I've got the validation working now. Thought I'd share the results and ask a question on style. Both examples work, but as a matter of best practice, which would be preferred? Also which would be more likely to remain in future cocoon releases? The validation code has to call existing Java code

Re: [CForm] javascript validation doesn't work?

2004-08-04 Thread Bruno Dumon
On Tue, 2004-08-03 at 23:08, Phil Snowdon wrote: > Take this snippet from the samples. Supposedly if the price is > less than one, then it will show a validation error. It > doesn't. > > > > > var success = true; > var price = widget.lookupWidget("dieselprice"); > i

Re: [CForm] javascript validation doesn't work?

2004-08-03 Thread Phil Snowdon
Ok, I found some references in the mailing list to this functionality being removed at 2.1.5 in favour of widget validators. (http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108639582110249&w=2) So how do they work? Anyone have a sample peice of code? >>> Phil Snowdon 4/08/2004 9:08:51 a.m.

[CForm] javascript validation doesn't work?

2004-08-03 Thread Phil Snowdon
Take this snippet from the samples. Supposedly if the price is less than one, then it will show a validation error. It doesn't. var success = true; var price = widget.lookupWidget("dieselprice"); if (price.value < 1) { price.setValidationError(new Packages

Re: CForms javascript validation

2004-07-14 Thread Adam Walsh
Ah, that makes sense :) Thanks Joerg, that was exactly what I needed. Adam Joerg Heinicke wrote: On 15.07.2004 05:30, Adam Walsh wrote: Hi, I have a form with two fields in it, where at least one of the fields must be filled in, and I've put a bit of javascript to check it in the form definition:

Re: CForms javascript validation

2004-07-14 Thread Joerg Heinicke
On 15.07.2004 05:30, Adam Walsh wrote: Hi, I have a form with two fields in it, where at least one of the fields must be filled in, and I've put a bit of javascript to check it in the form definition: field 1 if (widget.getValue() == null &&

CForms javascript validation

2004-07-14 Thread Adam Walsh
Hi, I have a form with two fields in it, where at least one of the fields must be filled in, and I've put a bit of javascript to check it in the form definition: field 1 if (widget.getValue() == null && widget.getParent().lookupWidget("fiel

Re: Bug in Forms v1, 2 & 3 using Cocoon v2.1.5, flow, javascript validation and debugging

2004-06-08 Thread Joerg Heinicke
On 08.06.2004 23:20, Yatin Shah wrote: My requirement: Perform business level validation to ensure the entered data are valid before notifying the user that their form request is accepted and refreshing the web page with acceptance message. [business level: requires access to external database fo

Re: Bug in Forms v1, 2 & 3 using Cocoon v2.1.5, flow, javascript validation and debugging

2004-06-08 Thread Yatin Shah
I also have a similar problem. I upgraded to 2.1.5, and now my javascript(flow) based forms(Cocoon Forms - woody) validation is no longer supported. I searched the mail list but could not really find a suitable solution. My requirement: Perform business level validation to ensure the entered data

Re: Bug in Forms v1, 2 & 3 using Cocoon v2.1.5, flow, javascript validation and debugging

2004-06-04 Thread Joerg Heinicke
also means that the http://localhost:/samples/blocks/forms/form1.flow sample no longer works as it should - the javascript validation rule for price per liter of diesel is not enforced). Please can someone help out with this? The flow level validation hack was replaced in favor of widget valid

Bug in Forms v1, 2 & 3 using Cocoon v2.1.5, flow, javascript validation and debugging

2004-06-03 Thread Adrian . Cross
Hi, I have a form that uses _javascript_ to perform validation.  I've implemented the validator using in the form definition.  Unfortunately, when I enable flow debug I get a NullPointerException on loading the form definition: Form (resource://org/apache/cocoon/forms/flow/_javascript_/v3/Form.