Over the last few weeks I’ve been communicating with Paul Hannan about the Value Picker and different behaviour if extlib.dijit.PickerListSearch.

With the Value Picker control, you have a number of options. The options can be provided from a list of hard-coded or computed values using the simpleValuePicker dataProvider. They can be provided from a view using the dominoViewValuePicker dataProvider. Or they can be defined in a Java class using the beanValuePicker. The beanValuePicker seems to be a bit of a misnomer in terms of its implementation, because you don’t add a bean definition to the faces-config.xml. Apart from the dataProviders you can add search functionality using the dojoType extlib.dijit.PickerListSearch and a checkbox can be added beside each option using the dojoType extlib.dijit.PickerCheckbox.

With the basic Value Picker, you get the same selection behaviour as with a Combo Box. To select a single value, you click. Ctrl or Shift can be used to select multiple values, if the control that the picker is bound to accepts multiple values.

But one of the problems, particularly with the dominoViewValuePicker, is that the picker only holds a finite number of options and there is no paging functionality to allow you to navigate to the remaining options.

This is where the dojoType extlib.dijit.PickerListSearch is required. But when that is enabled, the selection functionality changes. Single-clicking options no longer works, nor does Ctrl or Shift. Instead double-clicking an entry selects it. If the control the picker is bound to accepts multi-values, additional values are added by double-clicking each. Values are removed by clicking the cross beside each selected value at the top of the Value Picker dialog.

Another point to note is that the dojoType extlib.dijit.PickerListSearch does not work for the simpleValuePicker dataProvider. That is probably because that dataProvider is not intended for large lists of options. If a view is not suitable and you need to search the options, the beanValuePicker is required. If you have some knowledge of beans, you can use as a template the examples in the Extension Library Demo Database which use the list of states (comprising a label, a comma separator and an alias value). It took me a bit of time to convert it, but even though it’s been a few weeks since I did any Java, I managed to get a working example first time.

3 thoughts on “Extension Library Value Picker and extlib.dijit.PickerListSearch”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.