Hi,
A pragmatic way is described in http://wiki.apache.org/myfaces/FAQ bottom
of the page.
Not the most elegant way but works for me.
bye, Bjoern
--------------------------------------------------
Björn Mehner
InterComponentWare AG
Otto-Hahn-Str. 3
D-69190 Walldorf, Germany
"Nicklas Karlsson" <[EMAIL PROTECTED]> wrote on 15.03.2006 10:14:27:
> Hello,
>
> I have wired my beans with the Spring
>
> <application>
> <variable-resolver>org.springframework.web.jsf.
> DelegatingVariableResolver</variable-resolver>
> </application>
>
> So that the serviceLocator in the managed beans base class gets set:
>
> <managed-bean>
> <managed-bean-name>orderBean</managed-bean-name>
> <managed-bean-class>orderapplication.view.bean.OrderBean
> </managed-bean-class>
> <managed-bean-scope>session</managed-bean-scope>
> <managed-property>
> <property-name>serviceLocator</property-name>
> <value>#{serviceLocator}</value>
> </managed-property>
> </managed-bean>
>
> but the problem is that I can't call any methods (e.g. auto-
> populate) in the managed beans constructor that
> uses the serviceLocator, since it gets set after the constructor.
> Since JSF doesn't have any "init-mehtod" or such,
> is there a better way to auto-populate a bean than looking it up
> manually from another bean and calling the init method?
>
> Thanks in advance,
> Nik