voyent
Icefaces + Spring DI problem  XML
Forum Index -> General Help
Author Message
victuriosu

Joined: 26/Nov/2007 00:00:00
Messages: 27
Offline


I'm injecting a spring-bean as a managed-property in my faces-config. the property value is null and I need to call the constructor.

I think the bean is not being injected and i don't know why.

I'm using SpringBeanVariableResolver to link facesContext to Spring Context.

This is the bean config in faces-config.xml
Code:
 <managed-bean>
 		<managed-bean-name>videoManagerBean</managed-bean-name>
 		<managed-bean-class>view.VideoManagerBean</managed-bean-class>
 		<managed-bean-scope>session</managed-bean-scope>
 		
 		<managed-property>
 			<property-name>arbolDirectorio</property-name>
 			<property-class>model.finder.ArbolDirectorioBean</property-class>
 			<value>#{arbolDirectorio}</value>
 		</managed-property>
 		
 	</managed-bean>
 


applicationContext.xml
Code:
 <bean id="arbolDirectorio" class="model.finder.ArbolDirectorioBean" scope="session">
 		<constructor-arg value="P:/publico/vgutierrez/video" />
 	</bean>
 


I attach faces-config.xml and web.xml
Any help would be very apreciated. Thanks
 Filename web.xml [Disk] Download
 Description web.xml
 Filesize 5 Kbytes
 Downloaded:  421 time(s)

 Filename faces-config.xml [Disk] Download
 Description faces configuration
 Filesize 2 Kbytes
 Downloaded:  278 time(s)

victuriosu

Joined: 26/Nov/2007 00:00:00
Messages: 27
Offline


I've tried to define beans only in appContext.xml and my application access to the beans correctly, but when constructor is called and i try to use the injected bean, i get a NPE. I see in the log file that the bean is created, but i must call the constructor again. So I don't know what's happening, or what I'm doing wrong.
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team