|
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
1)
XPages: am I the only one fighting with validation on every partial update?
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?
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?
you are not alone!!! It drives me crazy! |
|

