Wendy Smoak wrote:
This is probably a JSF question, but I'm already here. :)MailReader's BaseViewController has: protected Object getBean(String name) { FacesContext context = getFacesContext(); return context.getApplication().getVariableResolver(). resolveVariable(context, name); } protected FacesContext getFacesContext() { return FacesContext.getCurrentInstance(); } Unwinding everything, I get: FacesContext.getCurrentInstance().getApplication() .getVariableResolver() .resolveVariable(FacesContext.getCurrentInstance(), name); All that, just to find my session scoped managed bean? Or am I making it way more complicated than it needs to be? I *really* miss 'session.getAttribute()' right about now...
Heh :-) Actually, IIUC if you're sure the bean has already been created you *can* do session.getAttribute() instead. But if you don't have that guarantee you need to write more code... I can see why that helper method exists!
L. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

