This content has been marked as final.
Show 2 replies
-
1. Re: Obtaining a handle to a EntityHome object
damianharvey Apr 23, 2007 11:19 AM (in response to hvram)I was just looking at this myself this morning.
Instead of calling:SomeObjectHome myHome = new SomeObjectHome();
You should instead use:SomeObjectHome myHome = Component.getInstance("someObjectHome");
Where "someObjectHome" is the @Name given to the Home Object. If you don't do it this way then 'Seam can't do it's magic' and you'll get NullPointerExceptions on injected objects like @Logger.
Cheers,
Damian. -
2. Re: Obtaining a handle to a EntityHome object
cptnkirk Apr 23, 2007 11:34 AM (in response to hvram)EntityHome was designed to be able to be used by JSF CRUD pages without needing additional java code. That said, it's generally preferred to access Seam components via @In than Component.getInstance().