Andrew Pollack's Blog

Technology, Family, Entertainment, Politics, and Random Noise

XPages bug - computewithform option for data sources with some formula language commands

By Andrew Pollack on 03/01/2012 at 01:07 PM EST

Bug Specifics:

The document you are attempting to save from your XPage may fail to save when the following conditions are all met:

1. You are using the XPage in a web browser (the issue does not seem to happen in the Notes client)

2. You have selected to computeWithForm "On Save" or "On Both" for the bound document ("On Load" does not seem to manifest the bug)

3. There is a computed field on the form which uses the "@UserAccess" function as part of its formula

Note: You can work around this by testing for @isError() on the result of your @UserAccess call to avoid the formula itself producing an error, however this is not necessary in any other context for the use of the @UserAccess function and so would not be something existing code will be testing for.

I found this after way too much effort. Being fairly new to actually trying to do useful things with XPages, I hadn't added a "Display Errors" design control to my page. Big mistake. I'd have saved a lot of trouble for myself if I'd just done that. Once I did, I saw that the attempt to compute the value at save time was generating the error "@Function may not be used in this context". This error is accurate in that it does represent the cause of the error, however it is inaccurate in that the function should work fine within the web browser context, and always has in the past. For this reason, I consider it a Regression Bug.

Impact on development:

The whole point of having the "ComputeWithForm" option is so that you can quickly take advantage of existing functionality while still using XPages to create a new way of accessing existing applications. This regression bug means that the existing application must be modified in order for the new XPages interface to be successfully used -- or else the entirety of the business logic for the page must be re-created on the XPage itself. Recreating the business logic is time consuming and is prone to creating differences in the result when the XPage is used vs. the traditional application.

In addition, this impacted me directly as I had to spend a couple of days chasing down a problem while trying to get used to working in XPages, instead of actually doing productive work.


  • 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: XPages bug - computewithform option for data sources with some formula language commandsBy Karsten Lehmann on 03/01/2012 at 05:22 PM EST
    Comment Loading
    re: XPages bug - computewithform option for data sources with some formula language commandsBy Andrew Pollack on 03/01/2012 at 05:31 PM EST
    Comment Loading
    re: XPages bug - computewithform option for data sources with some formula language commandsBy Nathan T. Freeman on 03/02/2012 at 09:11 AM EST
    Comment Loading
    re: XPages bug - computewithform option for data sources with some formula language commandsBy Andrew Pollack on 03/02/2012 at 09:47 AM EST
    Comment Loading


    Other Recent Stories...

    1. 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 ...... 
    2. 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 ...... 
    3. 03/15/2013Looking at SAML and OAUTH in the Notes and Domino 9 Public BetaAm I reading this right? Seriously? Like many people, when I read that next release of the Domino Server and Client were going to support OAuth and SAML, I was pretty happy with that. I've been a bit late getting around to looking at the beta though -- after all, IBM has made it quite clear that my opinion isn't all that welcome any more -- and I'm just now reading the documentation on how IBM is going about this. I'll know more when I talk about this stuff next week at BLUG, by the way. First SAML. I know ...... 
    4. 02/11/2013Just made plane and hotel reservations for BNUG -- my first time at that event.  
    5. 02/03/2013Can Software be Too Social to Succeed? 
    6. 02/01/2013Thoughts about the Opening General Session at Connect 2013 -- Do you have any? 
    7. 01/27/2013Who is to blame for the failure of Domino as public web server? IBM (Lotus) Product Management 
    8. 01/21/2013Small progress taking the first real steps in moving Second Signal off IBM Domino 
    9. 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? 
    10. 12/29/2012Have made some progress in chosing a new platform. 
    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.