Hi all. I hit a very strange issue this morning with my Partial Refreshes. It’s the first time i’ve been faced with this problem. I’m happy to say that I managed to resolve the issue, but I’m a bit confused as to why it was an issue in the first place.

Ok, so I have a button that performs an SSJS Function. It also triggers a Partial Refresh of a Panel in my XPage. This Panel that gets refreshed excludes my Button Bar Panel and for very good reasons. My Button Bar Panel should only be refreshed after the initial Partial Refresh of my other Panel in the XPage.

I do this by adding some CSJS to the onComplete event of my Button that’s triggered. It uses a Remote Service to check a condition, then if that condition is True, it performs a Partial Refresh of the Button Bar Panel. I used a XSP.partialRefreshGet for the partial refresh of the Button Bar Panel.

Now, what I noticed, was that the Button Bar Panel in some cases, was been refreshed before the Primary Partial Refresh. This doesn’t happen in the first 2 times that the button is clicked, but only from the 3rd time onward. I couldn’t understand this because according to Firebug, the Partial Refreshes occur in the correct Sequence.

How I fixed the issue was quite simple: I changed the XSP.partialRefreshGet to a XSP.partialRefreshPost. This immediately resolved the issue and everything works perfectly.

In short, I am just a bit confused as to why a XSP.partialRefreshGet would run its actions out of sequence. Very strange behavior.

Would love some feedback or comments.