1

I have been trying to get select2 to work on an existing xPages application with no luck. I keep getting errors saying select2() is not a function. I must have something messed up with my files/folders for the required code.

I am not sure what files I need to incorporate into the Web-Inf folder. I am using Domino 9.0.1 FP3

Does anyone have a sample db I could get to pick apart and see what I am missing?

Bitwyse1
  • 339
  • 3
  • 18
  • Your terms to google for: select2 AMD Xpages. The problem is that select2 uses AMD which won't work with XPages unless you tweak it a bit. We recently had this, too: http://stackoverflow.com/questions/34183917/xpages-getting-select-2-to-work-with-current-extension-library – Oliver Busse Dec 10 '15 at 21:35
  • I have tried that post. I think it's something I am doing wrong with the files I downloaded, the folders and how I load them in the theme. I was hoping to find a sample db that it's working on so I can duplicate it in my application – Bitwyse1 Dec 10 '15 at 21:44

1 Answers1

1

I've updated the Select2 demo on Bootstrap4XPages.com. That site is powered using the Bootstrap version in the ExtLib and no longer relies on the Bootstrap4XPages plugin. Select2 was added to the demo database in the WebContent folder and is loaded through a theme.

I've created the following examples:

  • Enabling Select2 on a ComboBox control, including a handler for the 'onchange' event that refreshes another section of the page.
  • Enabling Select2 on a ListBox control with multi-select.
  • A Select2 field that is attached to a (hidden) input and uses Ajax to get JSON search results from a second XPage.

Good luck picking it apart :-) The source is on GitHub

Mark Leusink
  • 3,747
  • 15
  • 23