Showing posts with label Managed Bean. Show all posts
Showing posts with label Managed Bean. Show all posts

Thursday, June 18, 2009

How to get Reference of one Managed Bean from other Managed Bean

FacesContext ctx = FacesContext.getCurrentInstance();

Application app = ctx.getApplication();

MyManagedBeanClass mb = (MyManagedBeanClass) app.getVariableResolver().resolveVariable(ctx,"MyManagedBean");