Hi Everyone. This is a shortish post where I feel it’s important to make mention of a few issues I ran into during one of my XPages Projects. Please heed my warnings and learn from my experience.

1. I had a problem where I have a button that triggers SSJS, but when I click on the button, nothing happens. My first guess was that the partial refresh wasn’t working as planned. But after what felt like forever, I finally realised that there were controls on the page that were been validated, and I had no error message box for them, because they were in a panel that wasn’t supposed to be refreshed. In my head, they shouldn’t be validating because I’m not refreshing that part of the page, but it seems that i’m wrong.

LESSON LEARNED: Please remember that if your button’s not doing anything, it’s most likely returning false before executing the SSJS, due to failed validation on controls that aren’t bound to an Error Message or Error Messages Control.

2. If you’re creating XPages the right way, your pages won’t be reloading when clicking on buttons, etc. You’ll be using partial updates. Now, the problem here is if you’re executing some advanced business logic, and somewhere it’s failing, you don’t see any XPages Errors returned because your partial refresh is an AJAX Post back. What I do here as a quick fix, is I set the button that fails to perform a full update instead of a partial update. This way, it will reload the page, and return the error that’s occurring. This is not best practice, but a relatively quick fix. I have not had the time to mess around with Medusa on OpenNTF, and OpenLog of XPages works well, but sometimes is a lengthy alternative.

LESSON LEARNED: A Full update is your worst enemy in XPages, but it will always tell you the truth 🙂

That’s it for now. Back to XPages Development.

Cheers all.