users@glassfish.java.net

Re: Read faces-config.xml

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 21 Mar 2007 09:12:38 -0700

Dyego Souza Dantas Leal wrote:
> Hello Guys !!!
>
> I'm creating a phaselistener in my JSF app...
>
> I need to get all "configured" Managed Beans... to lookup the classes
> and get some annotations...
>
> Exists way to extract all declared managed beans and classnames ?
>
> somebody help-me !!! hehehe
There is no implementation independent way to access this information.
If you want your application to be portable across implementations, you'll
need to parse the faces-config for that information yourself.

If depending on implementation specific APIs isn't a problem, then
here is the object [1] that encapsulates the managed beans within the RI.
You can obtain a map of all managed beans by calling
ApplicationAssociate.getManagedBeanFactoryMap() [2].

If you have additional questions on these internal APIs, please direct
them to users_at_javaserverfaces.dev.java.net.

[1]
http://fisheye5.cenqua.com/browse/~raw,r=1.17/javaserverfaces-sources/jsf-ri/src/com/sun/faces/config/ManagedBeanFactoryImpl.java
[2]
http://fisheye5.cenqua.com/browse/~raw,r=1.36/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationAssociate.java



>
> Tnks...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>