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
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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/seam-dev