Tuesday, July 12, 2016

Optimized XPages AMD fix

Recently, I had to use this fix for one of my projects. If you have done anything with Bootstrap in XPages, you have probably used this fix at least once. The one drawback with Kranenburg's design is that the snippet can only be used in the xp:resource section, which adds it to the top of the page. A common pattern is to load scripts at the end of the page to increase the speed of loading the page content. This pattern is used by many modern web sites. With this code snippet, you can use the AMD fix and load your client scripts using the optimized pattern with the benefits of fast loading times for your XPages.