[jboss-user] [JBoss Seam] - Re: Error in trying to injecting the bean

tony.herstell@gmail.com do-not-reply at jboss.com
Thu May 24 23:24:51 EDT 2007


The scope is event?
@Scope(EVENT)
Is that right?
Don't you not want this to be in a Conversation (preferred) or Session?
What is behind your choice of Event Scope?

Are you just jumping straight into the page (i.e. main page)?
You might not have been near the bean yet if so and not had a generalJournal created for you.

Also, you are not Outjecting the bean to your view...

  | @In(create=true)
  | 	private GeneralJournal generalJournal;
  | 

so


  | value="#{generalJournal.number}"
  | 
might have a hard job finding it in the view!

You have two choices here
Outject it...

  | @In(create=true) @Out
  | 	private GeneralJournal generalJournal;
  | 
or 
have a method on AccountAction that exposes a calss variable that contains it.

Both seem to work... but you have to do:
value="#{accountAction.generalJournal.number}"
to access the number.

I hope this helps you track down the problem.

 

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

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



More information about the jboss-user mailing list