logo       

ComponentManager injection in 2.2?: msg#00761

cms.sakai.devel

Subject: ComponentManager injection in 2.2?

(Sorry for all the questions... can you tell I am switching all my code
from covers to Spring injection?)

I am injecting the Component Manager and I keep ending up with a null
pointer exception. I have tried injecting it into the backing bean using
my faces-config like so:

<managed-property>
<description>componentManager</description>
<property-name>componentManager</property-name>
<value>#{Components["org.sakaiproject.component.api.ComponentManager"]}<
/value>
</managed-property>

And using my spring file like so:
<bean id="backingBean"
class="edu.vt.sakai.tool.BackingBean">
<property name="componentManager">
<ref bean="org.sakaiproject.component.api.ComponentManager" />
</property>
</bean>

If I use the cover (org.sakaiproject.component.cover.ComponentManager) I
get a nice non-null ComponentManager.

Is there anything obviously wrong with my code?
-AZ

--
Aaron Zeckoski (aaronz@xxxxxx)
Lead Developer - Learning Technologies - Virginia Tech

----------------------
This automatic notification message was sent by Sakai Collab
(http://collab.sakaiproject.org/portal) from the DG: Development site.
You can modify how you receive notifications at My Workspace > Preferences.




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise