In JSF1 you can access the bean instances of your current FacesContext by
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext()
ev.getApplicationMap().get(beanName) // get an @ApplicationScoped bean instance
ev.getSessionMap().get(beanName) // get a @SessionScoped bean instance
ev.getRequestMap().get(beanName) // get a @RequestScoped bean instance
In JSF2 @ViewScoped has been introduced, but I can’t find a corresponding getViewMap() method on ExternalContext? I am using latest JSF 2.1.1-b04.
Am i misunderstanding some aspects of a @ViewScoped bean? Is there another good-practice to get a @ViewScoped bean instance on the server side?
Thanks,
Steve
Try to eval expression (evaluateExpressionGet):