It turns out that this is related to Asynchronous module definition complications within XPages., although you do not get error messages in your web browser console.
Fixing the XPages R9 dojo define.amd problem once and for all
The principle is quiet simple but saves you a lot of headaches:
- duplicates define.amd to define._amd
- deletes define.amd
- loads the AMD enabled jquery plugin (successfully)
- duplicates define._amd back to define.amd
- deletes define._amd
Using a Theme
In stead of setting the fix for individual pages I am using a Theme to fix it (since I am using a Select2 combobox in my navbar header).
Step 1 – Adding two JS libraries to your WebContent
These files contain the same code as in the XSnippet.
Step 2 – Load your resources via a Theme design element
As a result the buttons on the XPage containing the Unite Gallery work fine again !
Happy development =)