I was reading Frank's article "How-to build a single select one choice component with images in the select item list" and wanted to share a method that we used to achieve similar result without a custom component.
The secret Menu and menu items.

Download the sample application from here.
To run the application add ADFUtils.java file to the app. It runs on HR schema.

In the sample application the state field is created using a menu. and the select items are created as commandMenuItems.
The advantage of using menu is we get whole list of features thats available with menu like grouping, sub menus, floating menus, images, shortcuts etc

The Menu items text property is bound to VO attribute #{bindings.StateProvince.inputValue}

Each commandMenuItem has an actionListener pointing to a backing bean method that sets the value of StateProvince attribute.


That's it. Heres how the final output looks like:

0 comments:

Newer Post Older Post Home