Announcement Announcement Module
Collapse
No announcement yet.
Problem creating comboboxbinding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


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

      Comment


      • #4
        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

        Comment

        Working...
        X