XPages: am I the only one fighting with validation on every partial update?
Julian Buss, May 27th, 2009 17:48:27
Tags:  XPages 
While working on our new cool app, I often come to this situation: validation kicks in when I don't need it.

Simple use case:
You have a XPage with some fields on it, which have validators, and a save and a cancel button.
Then you are doing some partial update, for exampel depending how a user filled a field. And BANG, validations kicks in.

But I DO NOT NEED validation on every partial update! I ONLY need it when the USER clicks on my save button! ONLY AND ONLY THEN.
So at the moment all the cool validation stuff is totally useless since on every page where I work with partial updates (and that is every page I'm working on...) I have that problem.

As far as I know the only workaround is to update only panels with fields having no validation or where the validation requirements are fullfilled... but that is pure theory, in the real world that's no help.
And yes, I know about the "no data validation" checkbox. But that's no help either, since when it's selected other things don't work (like re-computing data in a computed field).

So, I have to implement my own validation framework, don't I?
Comments (3) | Permanent Link

Comments:
1) XPages: am I the only one fighting with validation on every partial update?
Luc S Moreau 28.5.2009 13:09:31

Hey Julian. I am experiencing the very same problem. validation (client side / server side is same) triggers when i dont need it.

I tried to implement my own framework (a client side js function checking every field with a .mandatory class)... but i couldnt even find a way to trigger it.

Where is good old "onSubmit" client side javascript event?

So i m very interested if you manage to set up some validation process.

Luc.

2) XPages: am I the only one fighting with validation on every partial update?
Julian Buss 28.5.2009 13:45:22

why not triggering your validation when the user hits the submit button?

You can enter both client and server script, and if the client script returns false the server script is not being executed.

3) XPages: am I the only one fighting with validation on every partial update?
Mark Hughes 28.5.2009 14:32:45

you are not alone!!! It drives me crazy!

 Add a comment
Subject:
   
Name:
Mail:
Web:
 
Comment:  (No HTML - URLs with leading http://)
 
remember me?   
About this site
I am a Lotus Notes developer, consultant and one of the founders of YouAtNotes, a german software vendor specialized in Lotus Notes software for CRM, Workflow and Web solutions.
I write about IBM Lotus software and other stuff which I come across. Have a nice time here!

Search
RSS-Feeds
rssfeed.pngContent Feed
rssfeed.pngComment Feed
Recent posts
Recent comments
Links to YouAtNotes
Links to YouAtNotes (in german)
Archive
Impressum / Datenschutz
(german)