On 2011-10-28 12:17, Thorsten Scherler wrote:
On 28/10/2011 00:39, Thorsten Scherler wrote:
what is the recommended way to implement presentation logic in c3? JX was our
former choice but I could not find it in c3.
What should we use to implement simple presentation logic like we did with jx?
What are people using? Or do I need to migrate jx?
However I tend to support Thomas "JXGenerator is really useful, its a
must have for me." stringtemplate brings you loops and limited if but
nothing where you need to do e.g. ${foo.substring(1)}
...but for me we may even want to look into supporting jsp + taglibs to
produce sax/stax events since then we could reuse taglibs which are very
powerful and clean.
XSLT is more powerful and clean than JSP and taglibs and you can do any
presentation logic with it ranging from simplest template-like to pure
magic. Just marshal objects to XML and then you will newer feel a need
for JX/JSP/Velocity etc... Just my IMHO.
If you have to reuse existing taglibs, then it is more complicated. In
my practice it was always very easy to replace taglibs with something
more native to XSLT. But if you need it, then you have to use JSP... it
is also possible, just do forward/include of JSP, then buffer the output
and generate SAX events / make a pipeline from it - it is nothing but
plain Servlet API. I believe you can also use Cocoon includes to for
including any Servlet output and JSP is a Servlet too.