1 Reply Latest reply on Feb 18, 2008 7:51 AM by Pete Muir

    component with multiple interfaces?

    Alex Zhang Newbie

      My question is: can you use one component with multiple interfaces for multiple purposes?

      I am trying to use one class as both the backing bean and the selectItem converter, like this:

      @Stateful
      @Name("fooManager")
      @org.jboss.seam.annotations.faces.Converter
      public class FooManagerBean implements FooManager, javax.faces.convert.Converter{
      
      }
      

      <h:selectOneMenu ... converter="#{fooManager}"></h:selectOneMenu>
      


      But at run time I got this exception:

      Cannot convert FooManagerBean:3j011-5hrmn-fcfnjsws-1-fcfnlgsp-13 of type class org.javassist.tmp.java.lang.Object_$$_javassist_6 to interface javax.faces.convert.Converter


      I think this is neat because the converter and the backing bean are all together so there is no need to pass data around and no synchronization issues.

      Is this possible?