[ https://issues.apache.org/jira/browse/LABS-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14031918#comment-14031918 ]
jan iversen commented on LABS-306: ---------------------------------- is this still an issue, if not please close it (or let me close it) > [web] Raw "template" > -------------------- > > Key: LABS-306 > URL: https://issues.apache.org/jira/browse/LABS-306 > Project: Labs > Issue Type: New Feature > Components: Magma > Affects Versions: Current > Reporter: Simone Gianni > Assignee: Simone Gianni > Fix For: Future > > > Actually the Dispatch servlet, which serves content in Magma, operates in two > distinct ways : > - If result is a Producer, stream it to output. This is the case for > resources. > - If result is an HtmlProducer, pass it to a template, which will take care > of aggregating stuff around it and use an URLRewritingStream for proper URL > rewriting. > This is nice, but limitating. There are situations where : > - We want to serve an html fragment having the advantage of URL rewriting, > but not having a template around. > - We want to use a different template, and force it no matter what > - We want to use a different template and eventually different post > processing. > A use case for the first situation is quite simple : an html frameset for > example, there must be URL rewriting but no template around it. Another one, > serving an HTML fragment as the result on an AJAX call, we want the fragment > as it would appear inside the template, but without all the template around. > For the second situation, a good use case is a print template. There are > already a number of methods to set the template, using the Templatable > interface, but the innermost setting takes precedence over the outmost, whle > in this case the opposite should happen. > The third situation is for advanced stuff, like HTML to PDF generation > (perfectly possible with XSLT translating to XSL-FO, or using CSS 3 and a > postprocessor) or again more complex Ajax interactions. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: labs-unsubscr...@labs.apache.org For additional commands, e-mail: labs-h...@labs.apache.org