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

Pete Muir (JIRA) jira-events at lists.jboss.org
Thu May 15 11:47:27 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-2427?page=all ]

Pete Muir updated JBSEAM-2427:
------------------------------

     Issue Type: Feature Request  (was: Bug)
    Description: MockServletContext should look in WEB-INF/classes for resources as well as in the root.  (was: 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();
         }
)

> Email rendering from async method/event fails to find web resources
> -------------------------------------------------------------------
>
>                 Key: JBSEAM-2427
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2427
>             Project: Seam
>          Issue Type: Feature Request
>          Components: Mail
>    Affects Versions: 2.0.0.GA
>            Reporter: Allon Rauer
>         Assigned To: Pete Muir
>            Priority: Minor
>             Fix For: 2.1.x
>
>
> MockServletContext should look in WEB-INF/classes for resources as well as in the root.

-- 
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