myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Weber" <v.we...@inexso.de>
Subject Re: Getting all currently loaded managed beans in a phase listener
Date Thu, 29 Nov 2007 20:07:00 GMT
Hi,

the properties of managed beans are set in the order they occur in the
faces-config.xml. This is in the spec, so you can use the last
property setter as
initMethod.


Regards,
    Volker



2007/11/29, Todd Nine <todd.nine@gmail.com>:
> Hi all,
>   I'm using a combination of Spring and MyFaces for my project.  Since I use
> the managed bean properties to inject my Spring beans into my managed beans,
> I'm unable to do initialization in the constructor, and I really need to
> implement a callback in my managed beans to initialize values from the
> Spring business objects.  I have created something similar to the example on
> the following site.
>
> http://cagataycivici.wordpress.com/2006/06/06/managed_beans_aware_of_the/
>
> However, I'm dealing with a legacy application, and I can't depend on a
> standard naming convention as the example does, there is far too much code
> to refactor everything.  Is there any way I can get all currently loaded
> beans in the current thread instead of using something like the following to
> explicitly return it?
>
> event.getFacesContext().getApplication().createValueBinding(beanName).getValue(ctx);
>
> Thanks,
> Todd
>

Mime
View raw message