[
https://issues.apache.org/jira/browse/SLING-1?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger updated SLING-1:
----------------------------------
Component/s: (was: JCR Resource)
JCR
> Add functionality for "self rendering content"
> ----------------------------------------------
>
> Key: SLING-1
> URL: https://issues.apache.org/jira/browse/SLING-1
> Project: Sling
> Issue Type: New Feature
> Components: Engine, JCR
> Reporter: Philipp Koch
>
> it would be nice to have some kind of functionality that allows to define the
> rendering in the content class itself. there should be a component which
> would call the service(ComponentRequest request, ComponentResponse respone)
> method of the "to be rendered" content object. for that, i suggest:
> 1. public interface SelfRenderingContent {
> void service(org.apache.sling.component.ComponentRequest
> componentRequest, org.apache.sling.component.ComponentResponse
> componentResponse) throws org.apache.sling.component.ComponentException,
> java.io.IOException;
> }
> 2. a component that calls the service method of the content object (in case
> the content class implements the SelfRenderingContent ). it could look
> somehow like this:
> public class SelfRenderingContentComponent extends BaseComponent {
> void service(org.apache.sling.component.ComponentRequest
> componentRequest, org.apache.sling.component.ComponentResponse
> componentResponse) throws org.apache.sling.component.ComponentException,
> java.io.IOException {
> SelfRenderingContent content = (SelfRenderingContent )
> request.getContent();
> content.service(componentRequest, componentResponse);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.