dooApp/FXForm2

Readonly list as Combobox/Choicebox

Closed this issue · 3 comments

Hello;

I have some list of readonly words, I want to list them as Combobox or Choicebox in FXForm2. Which property must I use ?

I saw at demo, there is a choicebox but it gets values from an enum. Is there a way to use List/Set like enum in FXForm2, because I want to fill items dynamically?

For such cases, you can use a custom factory.
You can try with the freshly pushed ListChoiceBoxFactory in FXForm2 8.0.11-SNAPSHOT.
This factory can not be registered using @FormFactory annotation, since its constructor requires parameters (the list of choices). So it need to be registered using the FactoryProvider. Check the CustomFactoryForm sample to see how to use it.

Thank you @amischler , I will try that.