Andrew Pollack's Blog

Technology, Family, Entertainment, Politics, and Random Noise

Agh. Just when you think your XPage is behaving -- something else IBM failed to do right. Validation on multi-document XPages

By Andrew Pollack on 03/02/2012 at 02:25 PM EST

UPDATE: This is actually something already fixed. Paul Withers pointed me to this fix: I just had to check this box on the button event.



Now I'm off to eat some crow....


You have got to be kidding me. It turns out that if you have multiple data sources (documents) on different parts of your XPage, although you can individually toggle them into and out of edit mode, save them or discard them individually, and generally act on them as you'd expect; if you attempt to use the built in XPages validation functionality (which would be quite nice if it worked) -- you can't realistically separate it so only the validation events related to the document you're acting on get fired off.

That is to say, if you have DOC1 and DOC2 both in edit mode and you attempt to save DOC1 -- all of DOC2's validation code fires as well. If you're not done editing DOC2, it doesn't matter. You get validation failures and your DOC1 change doesn't complete. I detailed the specifics of the problem I'm having over here on Stack Overflow if anyone wants to show me I'm wrong. (thanks Paul Withers for doing just that)

I've seen several attempts to work around this -- some come pretty close. Particularly Tommy Valand's work -- though that falls down once one of the fields does invalidate for a valid reason, and the whole page has to be reloaded to set things right. I've also figured out a pretty complex way to make it work by using the events that fire both server and client side on each button to change the validation requirements of the various fields elsewhere in the XPage. These are hacks, and generally they require so much work you may as well just write your own damn client and server side validation code and ignore what IBM has done in XPages.

In searching, I've seen plenty of comments from XPages supporters saying "IBM is very much aware of this problem and is working on a solution" -- as Yoda might say "Fucking break you must give me!". We're several years and several revisions into a product that was already on the market (though truly not actually being sold to many people) at the time they bought it. This kind of amateur hour crap should have been dealt with years ago. And it was dealt with already.


  • car icon

    On Site Training

    We can bring the same kind of top quality training you get at conferences right to your offices. If your team needs training in a single topic, or you want to do a whole series on site, we can put a mini-conference together just for your team. For more information, Contact Me.
  • There are  - loading -  comments....

    re: Agh. Just when you think your XPage is behaving -- something else IBM failed to do right. Validation on multi-document XPagesBy Me on 03/02/2012 at 04:41 PM EST
    Comment Loading
    re: Agh. Just when you think your XPage is behaving -- something else IBM failed to do right. Validation on multi-document XPagesBy Andrew Pollack on 03/02/2012 at 04:54 PM EST
    Comment Loading
    re: Agh. Just when you think your XPage is behaving -- something else IBM failed to do right. Validation on multi-document XPagesBy Ed Maloney on 03/03/2012 at 12:50 PM EST
    Comment Loading
    re: Agh. Just when you think your XPage is behaving -- something else IBM failed to do right. Validation on multi-document XPagesBy Andrew Pollack on 03/03/2012 at 01:14 PM EST
    Comment Loading


    Other Recent Stories...

    1. 06/05/2013A conflict or rights: My question to my Libertarian friends about vaccination.Ok, Libertarian friends – where do you stand on this? I’ve used things like building codes, workplace safety, and similar topics before to frame the discussion of why we need government, but here’s one of best and most thorny conflicts in that debate for you… Vaccination is one of those really difficult subjects that pit personal freedoms against societal requirements. This article in Scientific American spurred me to ask the question. The basic conflict begins with your right over your own body. While ...... 
    2. 05/13/2013Successfully moved away from POSTINI to SPAMHERO - some thoughts...It's been almost a year since Google announced the changes in their "Postini" offering. I've been looking around, and finally chose to give [Spamhero] a try. As of today, I'm 100% switched over. Here's what I found, and a tip... Accuracy: I'm can definitely tell you is that Spamhero is accurate. I've had no false positives so far, and just a few spam messages that have gotten through. I had many more of both with Postini. For what spam does get through, you get a custom email address to forward the ...... 
    3. 03/22/2013BLUG A3 : Stuff Andrew Thinks You Should Know - The Presentation is now available for downloadThe BLUG conference was amazing. I had a great time, saw many people I really like, and watched a great deal of technical skill transfer take place as well as some wonderful peer to peer mentoring happening between some of the most experienced in our community and some of the newest members. Scott Souder gave a fantastic opening keynote talk that was fresh, frank, and encouraging. I love his energy and attitude, as well has his respect for the core products. Louis Richardson also did a great job. He makes ...... 
    4. 03/15/2013Looking at SAML and OAUTH in the Notes and Domino 9 Public Beta 
    5. 02/11/2013Just made plane and hotel reservations for BNUG -- my first time at that event.  
    6. 02/03/2013Can Software be Too Social to Succeed? 
    7. 02/01/2013Thoughts about the Opening General Session at Connect 2013 -- Do you have any? 
    8. 01/27/2013Who is to blame for the failure of Domino as public web server? IBM (Lotus) Product Management 
    9. 01/21/2013Small progress taking the first real steps in moving Second Signal off IBM Domino 
    10. 01/08/2013Does the Executive Branch of the U.S. Government (the President) have the Constitutional Authority to _NOT_ spend money allocated by the Congress? 
    Click here for more articles.....


    pen icon Comment Entry
    Subject
    Your Name
    Homepage
    *Your Email
    * Your email address is required, but not displayed.
     
    Your thoughts....
     
    Remember Me  

    Please wait while your document is saved.