I noticed that after rendering a Seam mail which failed (email address not
entered), redirects - using Redirect.instance() - had the string 'null' stuck
on the front of them.
It turns out to be two problems:
1) UIMessage does not call MailFacesContextImpl.stop() if an exception is
thrown in UIMessage.renderChildren
Fix:
| @Override
| public void encodeChildren(FacesContext context) throws IOException
| {
| try {
| JSF.renderChildren(FacesContext.getCurrentInstance(), this);
| } catch (Exception e){
| MailFacesContextImpl.stop();
| throw new FacesException(e);
| }
| }
|
2) MailExternalContextImpl.getRequestContextPath can return null. Further I
don't understand the need for this to return anything other than the delegate's
context path, as it doesn't appear to be used anywhere.
Anyhooo... the fix in (1) is all that is required to resume service as normal,
mail can do what it likes as long as it gives me back my original FacesContext
:)
Cheers - Ben
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045961#4045961
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045961
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user