Question

I was under the impression the version of bootstrap4xpages that was released during the IBM connect event last week, should contain a select2 control But now I’m a bit confused, maybe it’s only in the pipeline for a future release? I cannot find any examples on usage, anyone who knows about this? A code example would be appreciated. PS! I’m aware of the excellent web resource bootstrap4xpages.com but I cannot find anything there that answers these particular questions as the examples uses an older version of the plugin

Was it helpful?

Solution

Your impression was correct: the latest (January) release of the Bootstrap4XPages plugin contains two Select2 controls:

  • The "Select2 Picker for Combo/Listbox" is the simplest one and can be attached to a Listbox or Combobox control: drag it to your page, specify the ID of the control you want to attach it to ("for" property) and you're done.
  • The "Select2 Picker" is more complex can be attached to an input control. This control is implemented the same way as the Value Picker in the Extension Library and allows for different data providers (e.g. beans, views, full text searches, but also simple value lists).

I'm in the process of updating my bootstrap4xpages.com site to use the Bootstrap4XPages plugin, as I think that is definitely the best way to use Bootstrap with XPages. Most parts of the site now use that. I also added the Select2 demos I showed last week at IBM Connect to it. You can view the demos site here (the Select2 demos are in the "plugins" section of the menu).

The source of all parts of Bootstrap4XPages.com can be viewed in/ downloaded from my GitHub repository. Look for the Bootstrap_Select2Listbox.xsp and Bootstrap_Select2.xsp XPages.

(BTW: thanks for the compliment!)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top