Author: tsurdilovic
Date: 2010-03-09 14:51:37 -0500 (Tue, 09 Mar 2010)
New Revision: 12151
Modified:
branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/facelet/RendererRequest.java
Log:
JBSEAM-3769
Modified:
branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/facelet/RendererRequest.java
===================================================================
---
branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/facelet/RendererRequest.java 2010-03-09
17:29:39 UTC (rev 12150)
+++
branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/facelet/RendererRequest.java 2010-03-09
19:51:37 UTC (rev 12151)
@@ -44,7 +44,11 @@
private void init()
{
- request = new MockHttpServletRequest(HttpSessionManager.instance());
+ if (FacesContext.getCurrentInstance() != null) {
+ request = new MockHttpServletRequest(HttpSessionManager.instance(),
FacesContext.getCurrentInstance().getExternalContext());
+ } else {
+ request = new MockHttpServletRequest(HttpSessionManager.instance());
+ }
response = new MockHttpServletResponse();
setContextClassLoader();
Show replies by date