Hi, I'm just trying to figure out how to use the TigerEnumComboBoxBinder.
Added the following to the application context
In the form I'm adding the enum based property like this.Code:<bean id="binderSelectionStrategy" class="org.springframework.richclient.form.binding.swing.SwingBinderSelectionStrategy"> <property name="bindersForPropertyTypes"> <map> ... <entry> <key> <value type="java.lang.Class">java.lang.Enum</value> </key> <bean class="org.springframework.richclient.form.binding.swing.TigerEnumComboBoxBinder" /> </entry> </map> </property> </bean>
This gives the following exception:Code:formBuilder.add("initialState");
Do I have to register a seperate enum to text converter here?Code:No converter registered to convert from sourceClass 'class config.State' to target class 'class java.lang.String'
Then I've tried to add the enum field using this method:
This does not produce any exception, but the combo box is not populated with the available enum values (, exept from default value).Code:formBuilder.add(bindingFactory.createBoundComboBox("initialState"));
If supply the values to the binding factory like this:
then the combo box is populated with the enum values, but no i18n support.Code:formBuilder.add(bindingFactory.createBoundComboBox("initialState", State.values());
I've probably missed the most obvious part, but please someone guide me in the right direction here...
Thanks
Rune


Reply With Quote
) are working like a charm.