Friday, October 17, 2008

Reaching managed beans

Managed beans are reachable by injection through configuration of the faces-config or through look up using expressions like:


(MyBean)FacesContext.getCurrentInstance()
.getApplication().evaluateExpressionGet(
FacesContext.getCurrentInstance(),
"#{myBeanName}", MyBean.class);

No comments: