[seam-dev] PDF: missing pageEventClass

Dan Allen dan.j.allen at gmail.com
Thu Aug 27 23:54:05 EDT 2009


I can't find a reference to pageEventClass or the initPageEvent() method in
any of the Seam source code that I have on my machine (which is most Seam
versions). Are you sure this wasn't a patch you or your team was
maintaining? If not, please point to the SVN URL of the UIDocument class
when it had this method. Then we can get to the bottom of it. If it is a new
feature -> JIRA.

-Dan

On Sat, Aug 22, 2009 at 4:47 PM, Kenneth Christensen <
kec at mediatorsystems.com> wrote:

> Maybe someone could explain me why the "pageEventClass" have been
> removed from the UIDocument and why is it not supported by Seam PDF
> anymore?
>
> JBoss Seam 2.0.3:
>
>     @Override
>     public void encodeBegin(FacesContext context)
>         throws IOException
>     {
>         super.encodeBegin(context);
>
>         stream = new ByteArrayOutputStream();
>
>         try {
>             writer = createWriterForStream(stream);
>
>             initMetaData(context);
>             initPageEvent(writer);
>             processHeaders();
>
>             document.open();
>         } catch (DocumentException e) {
>             throw new RuntimeException(e);
>         }
>     }
>
>     protected void initPageEvent(DocWriter writer) {
>         if (pageEventClass != null && writer instanceof PdfWriter) {
>             try {
>                 PdfPageEvent event = (PdfPageEvent)
> Class.forName(pageEventClass).getConstructor().newInstance();
>                 ((PdfWriter) writer).setPageEvent(event);
>             } catch (Exception e) {
>                 throw new RuntimeException(e);
>             }
>         }
>     }
>
> JBoss Seam 2.2.0:
>
>    @Override
>    public void encodeBegin(FacesContext context) throws IOException
>    {
>       super.encodeBegin(context);
>
>       stream = new ByteArrayOutputStream();
>
>       try
>       {
>          writer = createWriterForStream(stream);
>
>          initMetaData(context);
>          processHeaders();
>
>          document.open();
>       }
>       catch (DocumentException e)
>       {
>          throw new RuntimeException(e);
>       }
>    }
>
> Best regards
>
> Kenneth Christensen
>
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
>



-- 
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://in.relation.to/Bloggers/Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20090827/33fb85cd/attachment.html 


More information about the seam-dev mailing list