Announcement Announcement Module
Collapse
No announcement yet.
Binding and Interfaces Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Binding and Interfaces

    Hi,

    I created a Binding IconBinding, Icon is an interface. Now I sent an object which implement this interface, let's say a ImageIcon I got an error.

    java.lang.IllegalArgumentException: No converter registered to convert from sourceClass 'class javax.swing.ImageIcon' to target class 'interface javax.swing.Icon'
    at org.springframework.binding.convert.support.Generi cConversionService.getConversionExecutor(GenericCo nversionService.java:144)
    at org.springframework.binding.form.support.AbstractF ormModel.createConvertingValueModel(AbstractFormMo del.java:331)
    at org.springframework.binding.form.support.AbstractF ormModel.getValueModel(AbstractFormModel.java:282)
    at org.springframework.richclient.form.binding.suppor t.AbstractBinding.getValueModel(AbstractBinding.ja va:113)
    at org.springframework.richclient.form.binding.suppor t.CustomBinding.<init>(CustomBinding.java:35)
    at com.itdove.richclient.form.binding.swing.IconBindi ng.<init>(IconBinding.java:22)

    The line 22 is where I call the constructor of CustomBinding.

    I could be nice if the .GenericConversionService could deal with it!

    Do you agree?

    Regards
    Dominique

  • #2
    I wonder if that is a spring-binding (currently hosted by spring-webflow) issue.

    GenericConversionService does not verify if the source class can be assigned to target class. It just checks if source class is equal to target class... Maybe you could file an issue in spring-webflow.

    Comment

    Working...
    X