[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2427) Email rendering from async method/event fails to find web resources

Allon Rauer (JIRA) jira-events at lists.jboss.org
Tue Dec 25 13:28:43 EST 2007


Email rendering from async method/event fails to find web resources
-------------------------------------------------------------------

                 Key: JBSEAM-2427
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2427
             Project: JBoss Seam
          Issue Type: Bug
    Affects Versions: 2.0.0.GA
            Reporter: Allon Rauer
            Priority: Minor


Our system sometimes renders emails (system status, etc.) triggered by a periodic async event.
In this context, the email renderer cannot find the xhtml email templates that reside in the web resources directory.

Solution: in org.jboss.seam.ui.facelet.FaceletsRenderer
modify this block (to propagate the servlet context)....
from:

         // If a FacesContext isn't available, set one up
         if (FacesContext.getCurrentInstance() == null)
         {
            MockFacesContext mockFacesContext = new MockFacesContext(new MockExternalContext())
                     .setCurrent();
            mockFacesContext.createViewRoot();
         }

to:

         // If a FacesContext isn't available, set one up
         if (FacesContext.getCurrentInstance() == null)
         {
            MockFacesContext mockFacesContext = new MockFacesContext(new MockExternalContext(ServletLifecycle.getServletContext()))
                     .setCurrent();
            mockFacesContext.createViewRoot();
         }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list