Hey,
I am trying to switch from Vaadin 7.0 to 7.1 and am experiencing an error while binding a JPAContainer 3.0 generated combobox to a beanfieldgroup. I had no error previously…
The code :
final BeanFieldGroup<Devis> binder = new BeanFieldGroup<Devis>(Devis.class);
binder.setItemDataSource(devisEntity);
JPAContainer<TypeBien> typeBiens = JPAContainerFactory.make(TypeBien.class, em);
ComboBox typeBienBox = new ComboBox("Votre bien immobilier",biens);
typeBienBox.setContainerDataSource(biens);
typeBienBox.setNullSelectionAllowed(false);
typeBienBox.setItemCaptionPropertyId("denominationFr");
typeBienBox.setFilteringMode(FilteringMode.CONTAINS);
typeBienBox.setImmediate(true);
typeBienBox.setConverter(new SingleSelectConverter(bienBox));
binder.bind(typeBienBox, "typeBien");
The error (which is caused by the binder.bind method)
java.lang.AbstractMethodError: com.vaadin.addon.jpacontainer.fieldfactory.SingleSelectConverter.convertToPresentation(Ljava/lang/Object;Ljava/lang/Class;Ljava/util/Locale;)Ljava/la
ng/Object;
at com.vaadin.data.util.converter.ConverterUtil.convertFromModel(ConverterUtil.java:94)
at com.vaadin.ui.AbstractField.convertFromModel(AbstractField.java:708)
at com.vaadin.ui.AbstractField.convertFromModel(AbstractField.java:693)
at com.vaadin.ui.AbstractField.setPropertyDataSource(AbstractField.java:629)
at com.vaadin.data.fieldgroup.FieldGroup.bind(FieldGroup.java:265)
at com.vaadin.data.fieldgroup.BeanFieldGroup.bind(BeanFieldGroup.java:163)
at com.example.montkitv7.Montkitv7UI.initUpDevis(Montkitv7UI.java:222)
at com.example.montkitv7.Montkitv7UI.init(Montkitv7UI.java:133)
at com.vaadin.ui.UI.doInit(UI.java:603)
at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:223)
at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:73)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1329)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Apparently, using the SingleSelectConverter doesnt work the same way anymore with 7.1?
I can get rid of the exception if i remove the setConverter(new SingleSelectConverter()) bit, but then I cannot save my combobox because the link between the value and the id isnt made anymore…
Anybody got an idea how to solve this?
Thanks
EDIT : just saw this ticket opened a few hours ago :
http://dev.vaadin.com/ticket/12185
I guess its related!