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.


  • text bubble icon

    Security Review

    How secure is your Domino environment? A security review doesn't have to be expensive to be helpful. If you're interested in finding out more, 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. 09/17/2014IBM Domino Servers STILL don't support SSL SHA-2 Certificates - and it is about to be a PROBLEMI haven't blogged about anything, much less an IBM Domino issue in quite some time, but as Mooney pointed out today, this one is moving quickly toward being critical. Read the article, then call your IBM sales rep and start demanding they update to include SHA-2 SSL support immediately. The only people who can get this done are big IBM Domino customers. Since this doesn't have a direct net positive effect on EPS (Earnings Per Share) for 2016, nothing is going to get done on it as long as they keep having ...... 
    2. 02/09/2014Changing what I do at the Fire DepartmentSo, here’s a bit of a change. A couple of weeks ago I let the chief know that it was time for me to step down as the Lieutenant of our Engine 1. Once a replacement is chosen, I’ll still be a firefighter but won’t be an officer any longer. There are a number of reasons for this, but the best explanation I can give is that it is time to let someone else grow into that role and make their own contribution, while at the same time I’ve got plenty of other things going on that keep me from putting as much time ...... 
    3. 02/07/2014Dammit. I think I broke facebook. ...... 
    4. 02/06/2014Sochi Olympics Pub Chat - Now Open 
    5. 02/05/2014Question for mobile app developers - what development platform do you recommend? 
    6. 02/03/2014Are you using a Surface Pro 2 or another Windows 8.1 Tablet? Want to use Traveler on the touch screen? It works! 
    7. 02/03/2014Some thoughts from IBM Connect 2014 
    8. 01/28/2014Understanding the decision behind Connections Mail 
    9. 01/19/2014Snap Review - Microsoft Surface Pro 2 - Tablet, Laptop Replacement, or Both 
    10. 10/31/2013You Need to Wish Gab Davis a Happy Birthday Today 
    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.