edu.nrao.sss.webapp
Class ManagedBeanRepository
java.lang.Object
edu.nrao.sss.webapp.ManagedBeanRepository
public class ManagedBeanRepository
- extends Object
This class provides an easy way to get access to JSF Managed Beans via
their EL value bindings (For example "#{managedBean}").
- Author:
- btruitt
Method Summary |
static
|
getManagedBean(Class<T> c,
String elStatement)
Fetches the Object that is currently being used in the FacesContext
by using its JSF Expression Language ValueBinding. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManagedBeanRepository
public ManagedBeanRepository()
getManagedBean
public static <T> T getManagedBean(Class<T> c,
String elStatement)
- Fetches the Object that is currently being used in the FacesContext
by using its JSF Expression Language ValueBinding. The reference returned
is a refrence of type
c
- Parameters:
c
- The class of the object being referenced by elStatementelStatement
- a JSF EL statement (i.e. "#{managedBean}").
- Returns:
- null if the ValueBinding doesn't exist or is of the wrong type.
- Throws:
IllegalArgumentException
- if elStatement
is invalid.
Copyright © 2009. All Rights Reserved.