after crawling through the code i finally got my first bound combobox running. 
i which to post my implementation to get some hints on making things better and to prevent mistakes...
the xml-config
Code:
<bean id="genreBinder" class="ui.binder.GenreBinder">
<property name="service">
<ref bean="genreService"/>
</property>
</bean>
<bean id="binderSelectionStrategy" class="org.springframework.richclient.form.binding.swing.SwingBinderSelectionStrategy">
<property name="bindersForPropertyTypes">
<map>
<entry>
<key>
<value type="java.lang.Class">business.Genre</value>
</key>
<ref bean="genreBinder"/>
</entry>
</map>
</property>
</bean>
based on the PetTypeBinder i wrote my GenreBinder and implemented the ApplicationListener interface. On an ApllicationEvent which contains a Genre, the Binder will call AfterPropertiesSet again to relaod the updated Collection from the service.
Code:
public class GenreBinder extends AbstractBinder implements InitializingBean, ApplicationListener {
private GenreService service;
private Map map;
public GenreBinder() {
super(Genre.class, new String[] {});
}
public void setService(GenreService service) {
this.service = service;
}
@SuppressWarnings("unchecked")
public void afterPropertiesSet() throws Exception {
map = new LinkedHashMap();
for (Iterator i = service.getAll().iterator(); i.hasNext();) {
Genre obj = (Genre)i.next();
map.put(obj.getName(), obj);
}
}
protected JComponent createControl(Map context) {
return getComponentFactory().createComboBox();
}
protected Binding doBind(JComponent control, FormModel formModel, String formPropertyPath, Map context) {
Assert.isTrue(control instanceof JComboBox, formPropertyPath);
ComboBoxBinding binding = new ComboBoxBinding((JComboBox)control, formModel, formPropertyPath) {
protected ValueModel getValueModel() {
return new GenreAdapter(super.getValueModel(), map);
}
};
binding.setSelectableItemsHolder(new ValueHolder(map.keySet()));
return binding;
}
// This is a hack to get the combo box working even though
// PetType does not implement equals/hashCode.
private class GenreAdapter extends TypeConverter {
private GenreAdapter(ValueModel valueModel, final Map map) {
super(valueModel, new Closure() {
public Object call(Object obj) {
return obj != null ? ((Genre)obj).getName() : "";
}
}, new Closure() {
public Object call(Object objName) {
return map.get(objName);
}
});
}
}
public void onApplicationEvent(ApplicationEvent evt) {
if (evt.getSource() instanceof Genre) {
try {
afterPropertiesSet();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
the new/edit/delete executors in the GenreManagerView fire a ApplicationEvent after an object is saved, updated or deleted, which invokes the binder to reload the objects.
Code:
getApplicationContext().publishEvent(new LifecycleApplicationEvent(LifecycleApplicationEvent.CREATED, object));
actual i try to implement a CustomerConverter which should convert a Class to a String but should not be able to convert from String to Object. I wrote a Class->String-Converter and wired it in the application-context but i get an error message which claims that there is not a converter in the other direction. how can o disable the back-converion from a string?
Code:
ERROR [AWT-EventQueue-0] (ApplicationLifecycleAdvisor.java:167) - No converter registered to convert from sourceClass 'class java.lang.String' to target class 'class business.PaymentAccount'
java.lang.IllegalArgumentException: No converter registered to convert from sourceClass 'class java.lang.String' to target class 'class business.PaymentAccount'
at org.springframework.binding.convert.support.DefaultConversionService.getConversionExecutor(DefaultConversionService.java:174)
at org.springframework.binding.form.support.AbstractFormModel.createConvertingValueModel(AbstractFormModel.java:306)
at org.springframework.binding.form.support.AbstractFormModel.getValueModel(AbstractFormModel.java:252)
at org.springframework.richclient.form.binding.support.AbstractBinding.getValueModel(AbstractBinding.java:112)
at org.springframework.richclient.form.binding.swing.TextComponentBinding.doBindControl(TextComponentBinding.java:39)
at org.springframework.richclient.form.binding.support.AbstractBinding.createControl(AbstractBinding.java:74)
at org.springframework.richclient.factory.AbstractControlFactory.getControl(AbstractControlFactory.java:48)
at org.springframework.richclient.form.binding.support.AbstractBindingFactory.interceptBinding(AbstractBindingFactory.java:90)
at org.springframework.richclient.form.binding.support.AbstractBindingFactory.createBinding(AbstractBindingFactory.java:68)
at org.springframework.richclient.form.binding.support.AbstractBindingFactory.createBinding(AbstractBindingFactory.java:53)
at org.springframework.richclient.form.builder.AbstractFormBuilder.getDefaultBinding(AbstractFormBuilder.java:72)
at org.springframework.richclient.form.builder.TableFormBuilder.add(TableFormBuilder.java:55)
at org.springframework.richclient.form.builder.TableFormBuilder.add(TableFormBuilder.java:47)
at com.mbee.ivs.adminApp.ui.saleManager.SaleForm.createFormControl(SaleForm.java:63)
at org.springframework.richclient.form.AbstractForm.createControl(AbstractForm.java:275)
at org.springframework.richclient.factory.AbstractControlFactory.getControl(AbstractControlFactory.java:48)
at org.springframework.richclient.dialog.FormBackedDialogPage.createControl(FormBackedDialogPage.java:74)
at org.springframework.richclient.dialog.AbstractDialogPage$1.createControl(AbstractDialogPage.java:52)
at org.springframework.richclient.factory.AbstractControlFactory.getControl(AbstractControlFactory.java:48)
at org.springframework.richclient.dialog.AbstractDialogPage.getControl(AbstractDialogPage.java:197)
at org.springframework.richclient.dialog.TitledPageApplicationDialog.createTitledDialogContentPane(TitledPageApplicationDialog.java:78)
at org.springframework.richclient.dialog.TitledApplicationDialog.createDialogContentPane(TitledApplicationDialog.java:132)
at org.springframework.richclient.dialog.TitledApplicationDialog.addDialogComponents(TitledApplicationDialog.java:120)
at org.springframework.richclient.dialog.ApplicationDialog.createDialog(ApplicationDialog.java:306)
at org.springframework.richclient.dialog.ApplicationDialog.showDialog(ApplicationDialog.java:272)
at ui.saleManager.SaleManagerView$NewExecutor.execute(SaleManagerView.java:253)
at org.springframework.richclient.command.support.AbstractActionCommandExecutor.execute(AbstractActionCommandExecutor.java:124)
at org.springframework.richclient.command.TargetableActionCommand.doExecuteCommand(TargetableActionCommand.java:99)
at org.springframework.richclient.command.ActionCommand.execute(ActionCommand.java:188)
at org.springframework.richclient.command.ActionCommand$1.actionPerformed(ActionCommand.java:123)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
i had no time yet to take closer look at the properties-disabling and the wizard-thing from my first posting. i will get there.. 
any hints for faster learning are very welcome...
thx and best wishes...