I blogged a few weeks ago about adding dataProviders for the Value Picker control. Following recent investigations, I managed to get an ArrayList as the source of a simpleValuePicker dataProvider.

As I found out, it fails if the valueList property is computed on page load (i.e. “${…}”). The error thrown, if you investigate in FireBug, is somewhat misleading:

Error message

I initially read the error as evidence that you could not pass an ArrayList into the simpleValuePicker. But after various tests, I have identified that it only fails if the valueList property is computed on page load. I’m assuming that this is somehow related to lazy loading and the valueList property not being loaded or converted to a String. But if the valueList property is computed dynamically (i.e. “#{…}”) it works fine.

This doesn’t allow you the flexibility for manipulating searching etc and I’m unsure how it would handle large ArrayLists, but may be appropriate for basic implementations. Values are also split from the label based on the labelSeparator. It appears that valueListSeparator is ignored.


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.

Scroll to Top