Hey Carlos

anonymous wrote : 
  | but when should i call the forwardToBaseAction() ??? In my Action 
constructor ?? 

As Christian said, the @Create annotation tells seam to call this function once 
the bean has been constructed. 

If you use Christians method beware that when you call setEntity, you are still 
in the constructor, so therefore nothing has been injected yet. This could 
cause problems, i.e. if you have code in setEntity which writes to the @Logger, 
then the logger won't be injected yet.

 You can get around it using the same syntax (something like 
Component.getInstance("org.jboss.seam.Logger")) but why use 2 methods of 
accessing components in your beans? 

Personally, I always create a @Create annotated create method so I can write 
code in it that will be called only once all the items have been injected. 

But hey, both will work.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043389
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to