i want to include a script using a specific resource type, eg:

<sling:include path="<%= child.getPath %>"
resourceType="/apps/myapp/test/nav" />

if the resource exists, the include tag handler does not create a
syntetic one and it uses the resource type of the resource.
if i create a syntic resource myself:

<% SyntheticResource res = new SyntheticResource(child.getPath(),
"/apps/myapp/test/nav"); %>
<sling:include resource="<%= res %>"/>

this results in a NPE:

Caused by: java.lang.NullPointerException
        at 
org.apache.sling.usling.renderers.DefaultHtmlRenderer.render(DefaultHtmlRenderer.java:53)
        at 
org.apache.sling.usling.renderers.DefaultHtmlRendererServlet.doGet(DefaultHtmlRendererServlet.java:72)
        at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:261)
        
so my question is: how can i include a resource using a specific resource type? 

regards, toby
-- 
-----------------------------------------< [EMAIL PROTECTED] >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Reply via email to