GREYDiscussion points about rendering context. NEEDS REVIEW GREY
Rationale:
- today renderers can't stream binaries (images, pdf, ..): MAGNOLIA-3014@jira
- the links are not always rendered the same way
- mails: use full links including the domain
- integration into other sites: portlets, ajax, ...
Goal
- uncouple the rendering and request processing
- possibility to streaming binaries (jsp)
Implementation
- interface
- getLinkTransformer()
- getWriter()
- getOutputStream()
Outlook
- parameters/attributes?
- redirect()/redirect()
- setExceptionHandler()
Overview
Content Tools
3 Comments
Magnolia International
Attributes would be one way to let components "talk" to each other; see for an example
info.magnolia.module.templatingcomponents.components.SingletonParagraphBar#isInSingleton
This would also need to hold current node+renderable(+model?); this pair (or trio) could maybe be kept in a stack of sorts.
Jan-David Salchow
Wouldn't it be way better to use some kind of dependency injection instead of putting everything into a context and collecting dependencies whenever needed? Maybe a JSR-330 compatible version of autowireing would be possible?
Jan Haderka
As of Magnolia 4.5
RenderingContext
returnsOutputProvider
that gives you access to eitherAppendable
or toOutputStream
so serving binaries should be now possible.