JSF: how to get all managed beans from faces-config.xml
Hi,
I am a JSF newbie and I face the following problem:
Is there a method that returns me (possibly) a list or other datastructure of all managed beans I have in my facesconfig.xml?
I am trying with getApplication()
but it doesn't help.
What I want to do is to read out managed beans from faces-config and iterate over them (and the properties set in faces-config.xml) in code.
Thanks!
[430 byte] By [
pi6502a] at [2007-11-26 21:44:31]

# 4
No, but if I've declared Configuration Beans in the session scope, I get them (beside other things). However, I have some other problem now:
Starting from an outcome, my code resolves which class to instantiate by looking at the faces-config.xml (see the above method I have used). However, I want *all* Configuration Beans (hence classes) to be instantiated, not just the one of that session... (the session would be the one related the outcome I have started from).
I am programming with an open source framework (FROG see http://dev.cocos.bz/projects/frog), which is heavily modified to use SOA approach (Business components that expose services). One BC = one Configuration Bean = one class.
Cheers!
# 5
You may have a look at Spring for this and move all your backing beans in the Spring context to manage them how you need it.
Here's the concept:
http://blog.rainer.eschen.name/2006/11/16/the-observer-pattern-in-mixed-dependency-injection-contexts-spring-jsf/
The deployment configuration can be found in the Spring reference or you use Spring-JSF (see article above).