mojarra icon indicating copy to clipboard operation
mojarra copied to clipboard

Modified the ViewHandlingStrategies for JSP and Facelet to allow recursive calls

Open Toberumono opened this issue 8 years ago • 0 comments

WriteBehindStateWriter is kept in a ThreadLocal, presumably to allow interoperability between the JSP and Facelet ViewHandlingStrategy implementations. However, this has the unfortunate side effect of preventing recursive calls to view rendering without creating a new thread.

Adding a setCurrentInstance method to WriteBehindStateWriter and a try-finally to the JSP and Facelet ViewHandlingStrategy's renderView methods allows us to account for potential preexisting WriteBehindStateWriters in the current Thread.

Toberumono avatar Aug 30 '17 22:08 Toberumono