We got past this one by making a modification in
org.apache.myfaces.context.portlet.PortletExternalContextImpl
| public String encodeNamespace(String name) {
|
| // changed by jli @ 29.9.2007 to allow seam email
| // generation in portal environment
| if (_isActionRequest) { // encodeNamespace only allowed for
| // RenderRequest
| return name;
| // String msg = "Can not call encodeNamespace() during a portlet
| // ActionRequest";
| // throw new IllegalStateException(msg);
| }
|
| // we render out the name and then the namespace as
| // e.g. for JSF-ids, it is important to keep the _id prefix
| // to know that id creation has happened automatically
| return name + ((RenderResponse) _portletResponse).getNamespace();
| }
|
We also discovered that you can't use facelet tags (ui: etc) when sending seam email
from inside portlet.. So below doesn't work and we had to implement looping outside
the template. The bad thing is that also the h: tags don't work..
| <ui:repeat value="#{people}" var="p">
| <m:message>
| <m:from name="#{person.firstname}
#{person.lastname}">#{person.address}</m:from>
| <m:to name="#{p.firstname}">#{p.address}</m:to>
| ...
| </m:message>
| </ui:repeat>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090052#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...