[jboss-user] [JBoss Seam] - Problem with injection @In

luiz.sg do-not-reply at jboss.com
Fri Oct 5 00:10:09 EDT 2007


Hi everyone,

I have a code like this:

  | 
  | @Name("entity")
  | public class Entity{
  | 
  | ...
  | 
  | }
  | 

and


  | 
  | @Name("myPOJO")
  | public class MyPOJO{
  | 
  | @In
  | private Entity entity;
  | 
  | ...
  | }
  | 
  | 
  | 


When I load the page that access this bean i get the error: In attribute requires non-null value: MyPOJO.entity

Than I changed my POJO to:


  | 
  | @Name("myPOJO")
  | public class MyPOJO{
  | 
  | @In(create=true)
  | private Entity entity;
  | 
  | ...
  | }
  | 

And now it works! 
But in the "hibernate" example that comes with Seam distribution the fist code works normaly.

Anyone can explain this?

Tanks

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

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



More information about the jboss-user mailing list