[ 
https://issues.apache.org/jira/browse/SLING-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572936#action_12572936
 ] 

Carsten Ziegeler commented on SLING-282:
----------------------------------------

I think we should remove "resource.node" completly, it causes too many problems.
The proper way is to use "currentNode".

> missing node functions in node wrapper
> --------------------------------------
>
>                 Key: SLING-282
>                 URL: https://issues.apache.org/jira/browse/SLING-282
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>            Reporter: Michael Marth
>            Assignee: Bertrand Delacretaz
>
> (this is on Launchpad revision 629151 running on top of crx)
> got an esp template that looks like:
>     <h1><%= resource.node %>: <%= resource.node.getName() %></h1>
>     
>     <%
>        var child = resource.node.getNode("2008-02")
>        if (child.getProperty("sling:resourceType") == "emailListMonth") {
>               %>yay<%
>       }
>     %>
> .getName() and .getNode("...") works OK, but .getProperty throws an exception:
> TypeError: getProperty is not a function
> same for .getNodes()

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

Reply via email to