[jboss-user] [JBoss Seam] - Re: @in(create=true) not working !

kukeltje do-not-reply at jboss.com
Thu Oct 4 22:50:46 EDT 2007


I have been struggling with this as well for the last few hours. The way I finally solved it was giving the injected variable the same name as the @Name value of the object to be injected. If I do not do this, I see in the debug that Seam tries to find a contectVariable with the name of the variable to be injected. It does not look (anymore?) for a contextVariable of the same type. If it finds nothing, no the create=true does not go off. 

So:

@In(create=true) MyObj myVar
  | in combination with 
  | @Name("myVar") 

works

whereas
@In(create=true) MyObj myOtherVar
  | in combination with 
  | @Name("myVar") 

does not (does not find the variable, but worse, does not create a new one)


An additional test with

@In(create=true, value="myVar") MyObj myOtherVar
  | in combination with 
  | @Name("myVar") 

works to...

Oh.. and I do not have a richpanel

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

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



More information about the jboss-user mailing list