• Browse Blogs
  • My Blog
  • My Updates

+Tags Get help with tags?

  • View as cloud  | list

+ Similar Entries

photo

Determining the pare...

Blog:  Adventures in...
Andy Cunliffe
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

XPages without javas...

Blog:  Adventures in...
Andy Cunliffe
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

Xpages quick-tip: ke...

Blog:  Mark Leusink
Mark Leusink
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

XPages without javas...

Blog:  Adventures in...
Andy Cunliffe
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

XPages without javas...

Blog:  Adventures in...
Andy Cunliffe
Updated 
No RatingsRatings 0     CommentsComments 1

+ Blog Authors  

XPages - The Good, The Bad and the UGLY - XIV

Peter Presnell |   | Tags:  validation xpages | Comments (1)  |  Visits (992)
I am presently spending a lot of my time back in Xpage school developing real-life Xpage functionaility.  So I can again share with you some of my thoughts based upon my latest experiences learning this new technology.
.
The Good: Validation - Yet another of the really cool capabilities Xpages bring to NSF development is a range of new options for validating fields.  Most controls have a validation section which allows you to set a property to mark that a field is required.  As with most properties of an Xpage, this can be enabled via a formula to conditionally determine when it is required.  Depending on the display type of the data (text, date/time, number) it is also possible to specify additional validation checks.  For strings this includes minimum and maximum lengths.  For dates, that the date lies within a specified range.   For attachments you can specify MIME types allowed (or not allowed).  Underlying this are a series nine different alidators that can be coded directly to do all of this plus a whole lot more.  In short there seems to be a a way to perform every form of validation possible.  Tied with the validtors are two error controls you can add to your Xpage.  This can be a single control that displays all validation errors, one control for each field being validated, or almost anywhere in between.
.

The Bad: Invalid Invalidation
- So in theory we have almost everything we could  dream of for validating fields right?  In practice however Xpage validation falls short of it potential.  It seems that there is currently no way to control when the validators are invoked.  The validation seems to get invoked each and every time the page refreshes.  This typically causes validation errors to be triggered before they are wanted.  There is a "No data validation" options but this seems to turn off a whole lot more than just the validators (e.g. updating the data!).  To get around this, as pointed out in the Domino Designer wiki, it seems you must create your own validation code using JS (client sided validation)t or SSJS (server sided validation).  So that leaves you back to not being able to use all that great validation stuff Xpages gives you - except when using VERY simple forms.
 .
The Ugly: Documentation - Not the first time i have mentioned this, but the on-line Help sucks.  On validation I get inciteful comments such as "Show Error details - to show the error details" and "Show Error summary - to show a summary of the errors" without any explanation or examples of what the difference between the two is.  Detailed explanations of the nine validators - if they are there they are well hidden.  Detailed explanation of the "No data validation" - No.  Any mention at all about "No data validation" - No.  Any explanation about the validation cycle - No.  IBM probably would have been better served if they linked their help menu in Xpages to google's search page as that seems to be the only way to find help about validation (and almost anything else in Xpages).
No RatingsRatings 0

Comments (1)

photo
1 barry mcgovern commented   Permalink No RatingsRatings 0

This is one that really had me frustrated and I thought it would be fixed in 8.5.1. The validation could be so awesome but as it is it is completely worthless.

 
 
In fact - it's worse then worthless - because every developer falls in love with it when reading about it, implements it in their system to only realize after many attempts that it just is not going to work. Then they need to reprogram all their validation.
 
 
The amount of hours in this community wasted on that has got to be huge! I know I wasted a ton of my time before I finally gave up on their validation.
 
 
It's a shame. Hopefully this will get fixed at some point.

Add a Comment Add a Comment

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About