Results 1 to 2 of 2

Thread: Binding and Interfaces

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Location
    Belgium
    Posts
    70

    Default 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. #2
    Join Date
    Apr 2006
    Location
    Germany, Berlin
    Posts
    61

    Default

    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.
    ___
    Mathias

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •