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 2008/09/15 08:57:47 UTC
[jira] Commented: (SLING-645) sling:superResourceType not taken
into account for StarResource
[ https://issues.apache.org/jira/browse/SLING-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630943#action_12630943 ]
Felix Meschberger commented on SLING-645:
-----------------------------------------
A StarResource is a SyntheticResource but does not overwrite the base class getResourceSuperType method, hence the resource super type of a StarResource is always null.
To fix this, the StartResource should implement its own getResourceSuperType method similar to the JcrItemResource:
private static final String UNSET_RESOURCE_SUPER_TYPE = "<unset>";
private String resourceSuperType;
public String getResourceSuperType() {
if (resourceSuperType == UNSET_RESOURCE_SUPER_TYPE) {
resourceSuperType = JcrResourceUtil.getResourceSuperType(this);
}
return resourceSuperType;
}
WDYT ?
> sling:superResourceType not taken into account for StarResource
> ---------------------------------------------------------------
>
> Key: SLING-645
> URL: https://issues.apache.org/jira/browse/SLING-645
> Project: Sling
> Issue Type: Bug
> Components: Engine
> Reporter: Bertrand Delacretaz
> Priority: Minor
>
> Given:
> 1) Rendering scripts at /apps/foo/foo.esp, /apps/bar/bar.esp, /apps/bar/ta.esp
> 2) /apps/foo having sling:resourceSuperType=bar
> 3) /realfoo having sling:resourceType=foo
> Rendering results:
> a) http://localhost:8888/content/bar/*.html is rendered by bar.esp -> ok
> b) http://localhost:8888/content/bar/*.ta.html is rendered by ta.esp -> ok
> c) http://localhost:8888/realfoo.ta.html is rendered by ta.esp -> ok
> d) http://localhost:8888/content/foo/*.ta.html is rendered by foo.esp -> should be ta.esp
> It seems like 2) is not taken into account for a StarResource.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.