[jboss-user] [JBoss Seam] - Re: Accessing generated PDFs

petemuir do-not-reply at jboss.com
Fri Feb 2 16:53:56 EST 2007


So, for emails, this is my suggestion as to how you should be able to attach PDFs to the email:

<m:message>
  |    ...
  |    <m:attachment>
  |       <p:document>
  |          ...
  |       </p:document>
  |    </m:attachment>
  | </m:message>

Of curse with this you would be able to use all the standard facelets templating stuff (ui:include being the one that springs to mind).

As for implementation I would guess something like:

UIAttachment

  | encodeBegin() {
  |    // If the attachment element contains a document element
  |    documentComponent.setRedirect(false);
  | }
  | 
  | encodeEnd() {
  |    // If the attachment element contains a document element
  |    InputStream is = documentComponent.getPdf();
  |    String name = documentComponent.getName();
  |    // Deal with attaching the InputStream
  | }

I write this tho' with no idea of the feasability of doing that with the jboss-seam-pdf ;)

There are some other problems with embedding/attaching images to emails (generally you want to display them inline as part of your html body than attach them).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4010258#4010258

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4010258



More information about the jboss-user mailing list