webtier@glassfish.java.net

Re: [webtier] JSF 2.0 PR ScopedAttributeELResolver/FacesContext/PhaseListener Issue?

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Fri, 09 Jan 2009 07:30:15 -0800

Lincoln Baxter, III wrote:
> 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.
>
Yeah, we fixed that earlier this week. Could you try with one of the
latest
nightly builds?
> 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.
>
Right, it shouldn't cause the NPE.
> 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
>