Review:
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1866
On 11/12/10 11:37 AM, dueni_at_dev.java.net wrote:
> https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1866
>
>
>
>
>
>
> ------- Additional comments from dueni_at_dev.java.net Fri Nov 12 16:37:39 +0000 2010 -------
> Hi Roger,
>
> I think it would be better to introduce a method like this:
> private FacesContext getFacesContext() {
> if (ctx == null || ctx.isReleased()) {
> ctx = FacesContext.getCurrentInstance();
> }
> return ctx;
> }
>
> and use that method inside PartialViewContextImpl wherever ctx was used
> directly. That way the caching of ctx happens as late as possible and it would
> also respect a possibly changing FacesContext in case of portal integration
> where ctx might change between execute and render phase.
>
> This kind of caching FacesContext could also be implemented in UIComponentBase -
> but that would be another issue.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: issues-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: issues-help_at_javaserverfaces.dev.java.net
>
--
roger.kitain_at_oracle.com
https://twitter.com/rogerk09
http://www.java.net/blogs/rogerk