[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
Wed Dec 26 06:05:43 EST 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-2427?page=all ]
Pete Muir updated JBSEAM-2427:
------------------------------
Fix Version/s: 2.0.x
> 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
> Components: Mail
> Affects Versions: 2.0.0.GA
> Reporter: Allon Rauer
> Assigned To: Pete Muir
> Priority: Minor
> Fix For: 2.0.x
>
>
> 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