webtier@glassfish.java.net

JSF 2.0 PR ScopedAttributeELResolver/FacesContext/PhaseListener Issue?

From: Lincoln Baxter, III <lincolnbaxter_at_gmail.com>
Date: Thu, 08 Jan 2009 22:00:23 -0500

Hey Guys,

So I am doing some work in Phase Listeners, but before the RESTORE_VIEW
phase. I am attempting to access EL values, but since the
FacesContext.getViewRoot() returns null at this point, ScopedAttributeELResolver
bombs at line 80 when attempting to retrieve the viewMap() and I get a NullPointerException.

Is FacesContext supposed to have a ViewRoot before the RESTORE_VIEW
phase? It seems like it should probably not crash at least, unless you
attempt to access the ViewScope attributes.

This didn't happen in 1.2, which I can deduce is because 1.2 did not
have the ViewScope. I'm trying to patch it but having some issues with
my build path in wonderful eclipse. I'll send you what I come up with
if you're interested.

Thoughts?

Thanks,
Lincoln