ChoiceBox cell factory?
zonskiNov 9 2011 — edited Nov 17 2011Is there any reason why ChoiceBox doesn't use the same cell factory approach used by list/table/tree? Unless I'm missing something (?) it looks like the intention is that we should just add our nodes (i.e. cells) directly to the list of items.
This is a little odd for me, I would normally want to put my data elements (Beans or enums) in the ChoiceBox and have the renderer take care of the rest, just like I do with lists/tables/trees. In the current model I am having to iterate over my data items and create a custom cell for each one, then when something is selected, etc, I have to get the data item out of my custom cell. It all feels a tad awkward?
Edit: actually adding nodes doesn't seem to work either? I've resorted to creating a wrapper class for my Bean that provides a toString that does my formatting. In this approach, I also lose my underscores in my text (in the popup only, the button bit seems fine) - I assume this is something to do with mnemonics but I have not turned these on and can't see a simple way to turn them off. This all seems a bit wrong, what am I missing?