[jboss-user] [JBoss Seam] - component with multiple interfaces?

alex.x.zhang do-not-reply at jboss.com
Sun Feb 10 15:28:02 EST 2008


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:

anonymous wrote : 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? 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128193#4128193

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128193



More information about the jboss-user mailing list