A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
gettting managed bean names
Joined: Aug 11, 2004
Sep 09, 2005 09:14:00
Is there a way to programmatically access the names of all of the managed beans that are declared in faces-config.xml?
Joined: May 30, 2002
Sep 11, 2005 22:26:00
Unfortunately as of now there isn't any api/method provided by
But you can do it through your program by parsing xml or reading a properties file containing the names of beans.
Joined: Mar 04, 2005
Sep 12, 2005 03:26:00
javax.servlet.ServletContext sCtx = (javax.servlet.ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); java.util.Enumeration enum = sCtx.getAttributeNames();
Will return the names of the objects stored in the session. This will include managedBeans, but I guess they have to have been instantiated before theyre in the enumeration.
I agree. Here's the link:
subject: gettting managed bean names
Access session Bean from another backing Bean
Discussion of Naming Policy
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013