You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2007/10/04 21:04:50 UTC

[jira] Created: (SLING-41) Create synthetic content content on sling:include if real content does not exist

Create synthetic content content on sling:include if real content does not exist
--------------------------------------------------------------------------------

                 Key: SLING-41
                 URL: https://issues.apache.org/jira/browse/SLING-41
             Project: Sling
          Issue Type: Improvement
          Components: JSP
    Affects Versions: 2.0.0
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: 2.0.0


Consider a page component which includes a footer. Such a footer may or may not exist. If no real content exists, it would be usefull, if a simple Content instance with just the path and the component ID would be created to render a default footer. To support this feature, a new attribute - the component id - needs to be added to the sling:include tag.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-41) Create synthetic content in sling:include if real content does not exist

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-41:
-----------------------------------

    Summary: Create synthetic content in sling:include if real content does not exist  (was: Create synthetic content content on sling:include if real content does not exist)

> Create synthetic content in sling:include if real content does not exist
> ------------------------------------------------------------------------
>
>                 Key: SLING-41
>                 URL: https://issues.apache.org/jira/browse/SLING-41
>             Project: Sling
>          Issue Type: Improvement
>          Components: JSP
>    Affects Versions: 2.0.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> Consider a page component which includes a footer. Such a footer may or may not exist. If no real content exists, it would be usefull, if a simple Content instance with just the path and the component ID would be created to render a default footer. To support this feature, a new attribute - the component id - needs to be added to the sling:include tag.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-41) Create synthetic content in sling:include if real content does not exist

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-41.
----------------------------------

    Resolution: Fixed

First I added another implementation of the Content interface: org.apache.sling.content.jcr.SyntheticContent. This implementation is a blank extension of the abstract BaseContent class, which provides a constructor taking a path and component ID. This class makes it easy to provide content to the system to call specific handling.

The sling:include tag is extended with a new componentId attribute, which only is used if the path attribute is set and the content attribute is not set:

If the componentId attribute is set, the tag handler tries to request a Content object for the set path. If such a Content object exists, that object is used. If no such content object exists, a SyntheticContent instance is created with the set path and component Id. This synthetic Content object is then used.

If the componentId attribute is not set, the path is forwarded to the request dispatcher for further treatment.

Please be aware of the slight semantic difference regarding the path depending on whether the compoinentId attribute is set or not: If the componentId is not set, the path may include selectors and extensions besides the path to the Content itself as the request dispatcher is able to find the Content object and then use the selectors and extensions as input to the included Component. If the componentId is set, the request dispatcher is not used to find the Content object, instead the path must exactly address the content.

> Create synthetic content in sling:include if real content does not exist
> ------------------------------------------------------------------------
>
>                 Key: SLING-41
>                 URL: https://issues.apache.org/jira/browse/SLING-41
>             Project: Sling
>          Issue Type: Improvement
>          Components: JSP
>    Affects Versions: 2.0.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> Consider a page component which includes a footer. Such a footer may or may not exist. If no real content exists, it would be usefull, if a simple Content instance with just the path and the component ID would be created to render a default footer. To support this feature, a new attribute - the component id - needs to be added to the sling:include tag.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-41) Create synthetic content in sling:include if real content does not exist

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-41:
-----------------------------------

    Component/s: Content

Add Content component as the SyntheticContent has been created as part of the Content component.

> Create synthetic content in sling:include if real content does not exist
> ------------------------------------------------------------------------
>
>                 Key: SLING-41
>                 URL: https://issues.apache.org/jira/browse/SLING-41
>             Project: Sling
>          Issue Type: Improvement
>          Components: Content, JSP
>    Affects Versions: 2.0.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> Consider a page component which includes a footer. Such a footer may or may not exist. If no real content exists, it would be usefull, if a simple Content instance with just the path and the component ID would be created to render a default footer. To support this feature, a new attribute - the component id - needs to be added to the sling:include tag.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.