Exporting datatables
by Nicklas Karlsson
Hi,
While looking for css parsing for the excel-export of datatables, I
recalled running into https://xhtmlrenderer.dev.java.net/ before. What
it essentially
does is parses xhtml and converts it to pdf/image/svg, taking
stylesheets etc into account.
Does anyone here have any insight on if it would be possible in JSF
to, given a component id, dig it out, render it to a temporary
document, strip
out the other components from the body with exception of the component
to export and its parents (preserving stylesheet info), make sure it's
xhtml compliant
(through TagSoup or some other library), convert it to the target
format (through the xhtmlrenderer) and hanging the result on the
DocumentStore?
It could be handy to make in-application screenshots (targetting the
root) to pdf/image or just to target a component (datatable) to
export(?)
---
Nik
16 years, 3 months
hot deployment broken in trunk
by Dan Allen
I switched over to using Seam trunk to prepare some demos for my talks
and I quickly discovered that hot deployment is not working. The
problem is that the hot deployment routine in Initialization is trying
to access a non-initialized private field, hotDeploymentStrategy. In
Seam 2.0, the strategy was setup both at initial deployment and hot
deployment. In Seam trunk, the setup does not occur during hot
deployment.
I fixed it by changing (around line 664):
//TODO open the ability to reuse the classloader by looking at the
components class classloaders
// Rescan
hotDeploymentStrategy.scan();
// And install
installHotDeployableComponents();
Pages.instance().setHotDotPageDotXmlFileNames(DotPageDotXmlDeploymentHandler.hotInstance().getFiles());
to:
createHotDeployment(Thread.currentThread().getContextClassLoader());
//Pages.instance().setHotDotPageDotXmlFileNames(DotPageDotXmlDeploymentHandler.hotInstance().getFiles());
I had to comment out the scanning for new .page.xml files because
somewhere it was throwing a null pointer that I didn't track down.
-Dan
--
Dan Allen
Software consultant | Author of Seam in Action
http://mojavelinux.com
http://mojavelinux.com/seaminaction
NOTE: While I make a strong effort to keep up with my email on a daily
basis, life and work come first and, at times, keep me away from my mail
for a while. If you contact me, then don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.
16 years, 3 months
PDF fill-in-forms support
by Nicklas Karlsson
Hi,
Do you think that people would find use for Seam support of
populating fields of pre-generated PDFs?
One scenario would be if you have a PDF with a complex layout that
you don't want to generate every time. You could create
the layout once and define the field names in Acrobat and then place
it in an accessable location (some sort of permanent
DocumentStore) and then have a tag like
<p:form URL="#{formURL}">
<p:field name="name" value="#{person.name}"/>
</p:fillInForm>
The tag would then fetch the template, populate the fields and output
the generated PDF. The code itself in iText is very
simple (example operating on files):
PdfReader reader = new PdfReader("c:/temp/form.pdf");
PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream("c:/temp/out.pdf"));
AcroFields f = stamp.getAcroFields();
f.setField("person.name", "Cthulhu von R'yeh");
stamp.setFormFlattening(true);
stamp.close();
Perhaps even some plugin-tag that would enable to save the generated
PDF to a database. Or something.
---
Nik
16 years, 3 months
Starting release of 2.1.0.BETA1
by Jay Balunas
People,
All the issues scheduled for the Seam 2.1.0.BETA1 are now closed, so we
shall start the tagging, testing, and release process.
Please consider the *trunk* frozen until myself or the development team
announces that the release is complete. You need to pre-clear any
commits with me, or Pete.
Thanks,
Jay
16 years, 3 months
atom/rss jsf tag support
by Nicklas Karlsson
I recently committed (as discussed with Pete) some code to
org.jboss.seam.rss that enables you to
use JSF tags for creating rss/atom feeds. It is based around the
YARFRAW (http://yarfraw.sourceforge.net/)
library. The only other new dependency is commons-lang. There is a
quick-and-dirty build.xml included in
the source dir that requires some modification, I didn't want to mess
with the main build structure while
it was in the "collecting feedback" stage.
Any use for it in the trunk? Any considerations/feedback before
expanding on it? It is currently very simplified,
using a parent-child Feed -> Entries structure with several
simplifications (only one author, name only etc).
usage is in the lines of
<r:feed
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:r="http://jboss.com/products/seam/rss"
title="#{rss.feed.title}"
uid="#{rss.feed.uid}"
subtitle="#{rss.feed.subtitle}"
updated="#{rss.feed.updated}"
link="#{rss.feed.link}">
<ui:repeat value="#{rss.feed.entries}" var="entry">
<r:entry
uid="#{entry.uid}"
title="#{entry.title}"
link="#{entry.link}"
author="#{entry.author}"
summary="#{entry.summary}"
published="#{entry.published}"
updated="#{entry.updated}"
/>
</ui:repeat>
</r:feed>
Some questions that came to mind:
* Delivery mechanism: I currently use the document store. Any better
alternatives? Some sort of flush + response complete?
* Most attributes support both text and html formats. Should there be
1. One "textFormat"-swith at feed level
2. titleFormat and title, subtitleFormat and subtitle etc..
3. Complex tag structure with <r:title format="html">title</r:title> etc?
I'm currently leaning towards 1.
* What level of the atom specs to support? All of it? At least r:link,
r:author, r:contributor, r:category, r:source, r:generator would
be required (or whatever multi-attribute 0:n stuff are nested in the
feed/entry elements in the specs)
* Any usage for it in wiki? I haven't really looked that much as the
wiki, it seems to have an own feed servlet and perhaps some cacheing
requirements
---
Nik
16 years, 3 months
message parameters for bean validation
by Hardy Ferentschik
hi there,
I am currently working on the bean validation implementation and have a
question where I thought you guys might have valuable input.
Basically, I am implementing the message interpolation right now and
according to the spec a message parameter is just enclosed by {}. The
existing code uses #{}. Now the question is, what should it be and why?
The existing #{} is probably inspired by EL, but on the other hand the the
format used by ResourceBundle and MessageFormat is {}. What should it be?
--Hardy
16 years, 3 months
Seam 2.1 BETA1
by Pete Muir
As you can see from JIRA, we are approaching the point to freeze
development for Seam 2.1 BETA1.
The only known blocking issue is any alterations needed to the Seam
deployment SPIs to enable us to delegate annotation scanning to the
underling runtime. Ales is working on an implementation for JBoss 5
this week, and he thinks he should know any changes needed by the end
of the week (the development freeze has been put back a few days to
allow for this).
Then the release will go out at the beginning of next week.
16 years, 4 months
JSF 2.0 new feature series off to a strange start
by Dan Allen
Ryan Lubke just began a preview series for the new features in JSF
2.0. That, in itself, is a good thing. But I'm terribly confused as to
why ProjectStage is the first feature highlighted, or why the hell it
is even a feature of JSF 2.0. Of all the things that are wrong with
JSF, that's the most important one? Seriously? Maybe I'm missing the
vision, but why in the hell does JSF control the deployment
environment variable anyway? Isn't JSF a UI framework? It boggles my
mind.
http://java.dzone.com/news/jsf-20-new-feature-preview-ser
>From our farmhouse discussions on the future of JSF, I'm quite certain
that we are concerned about more important issues.
-Dan
--
Dan Allen
Software consultant | Author of Seam in Action
http://mojavelinux.com
http://mojavelinux.com/seaminaction
NOTE: While I make a strong effort to keep up with my email on a daily
basis, life and work come first and, at times, keep me away from my mail
for a while. If you contact me, then don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.
16 years, 4 months
EL Function Support
by Nicholas Hagen
Not sure if this is the right list or not but I just read your article
on EL function support. I wanted to let the team know I also created
an EL impl with function support. My impl also includes variable
argument support so that you can declare a method such as add(int..
vals) and then invoke via #{bean.add(5,3,5,4)} to return 17.
Otherwise, I think mine is fairly similar in support. Anyways does
anyone have an interest in merging the two impls to get the best
combination of features?
Thanks,
Nicholas Hagen
Z|NET Development, LLC
nicholas.hagen(a)znetdevelopment.com
16 years, 4 months