Results 1 to 4 of 4

Thread: Problem creating comboboxbinding

  1. #1
    Join Date
    May 2006
    Posts
    7

    Default Problem creating comboboxbinding

    I'm trying to create a comboboxbinding, but I always get an error like this
    Code:
    org.springframework.binding.convert.ConversionException: Unable to convert value '[be.dovre.model.Person@1368c5d, be.dovre.model.Person@3945e2]' of type 'java.util.ArrayList' to class 'javax.swing.ListModel'; nested exception is java.lang.AbstractMethodError: org.springframework.binding.convert.support.AbstractConverter.doConvert(Ljava/lang/Object;Ljava/lang/Class;Lorg/springframework/binding/util/MapAccessor;)Ljava/lang/Object;
    java.lang.AbstractMethodError: org.springframework.binding.convert.support.AbstractConverter.doConvert(Ljava/lang/Object;Ljava/lang/Class;Lorg/springframework/binding/util/MapAccessor;)Ljava/lang/Object;
    	at org.springframework.binding.convert.support.AbstractConverter.convert(AbstractConverter.java:82)
    	at org.springframework.binding.convert.ConversionExecutor.execute(ConversionExecutor.java:98)
    	at org.springframework.binding.convert.ConversionExecutor.execute(ConversionExecutor.java:85)
    	at org.springframework.richclient.form.binding.swing.AbstractListBinding.convertValue(AbstractListBinding.java:156)
    	at org.springframework.richclient.form.binding.swing.AbstractListBinding$SelectableItemsVisitor.visit(AbstractListBinding.java:175)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    this is wat the following code
    Code:
     List personsList = ((PersonManager) getApplicationContext().getBean("personManager")).getAllPersons();
    ValueModel personVM = new ValueHolder(personsList);
    ComboBoxBinding personCB = (ComboBoxBinding) sbf.createBoundComboBox("employee", personVM, "name");
    I also tried creating a custom binder, but it all ends up in similar errors as the above one. What am I doing wrong?

  2. #2
    Join Date
    Apr 2006
    Location
    Germany, Berlin
    Posts
    61

    Default

    you are using a wrong version of spring-binding.

    If you use spring-rich 0.2.1 you need version 1.0-rc3 of spring-binding.
    If you use the latest trunk version of spring-rich (0.3.0-SNAPSHOT) you need to use version 1.0 of spring-binding.
    ___
    Mathias

  3. #3
    Join Date
    May 2006
    Posts
    7

    Default

    you are right, thank you very much. Are those dependencies somewhere documented?

  4. #4
    Join Date
    Apr 2006
    Location
    Germany, Berlin
    Posts
    61

    Default

    Yes. You can find them here: http://spring-rich-c.sourceforge.net...endencies.html

    But the website is not uptodate with current trunk. So the best place would be the main pom.xml of spring-rich: https://svn.sourceforge.net/svnroot/...client/pom.xml
    ___
    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
  •