You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2023/04/12 07:18:00 UTC

[jira] [Resolved] (SLING-328) access to node props in esp

     [ https://issues.apache.org/jira/browse/SLING-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-328.
------------------------------------
    Resolution: Won't Fix

> access to node props in esp
> ---------------------------
>
>                 Key: SLING-328
>                 URL: https://issues.apache.org/jira/browse/SLING-328
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting JavaScript 2.0.2
>            Reporter: Michael Marth
>            Priority: Major
>
> My .esp looks like
> for (var i in currentNode.getNodes()) {
>             if(currentNode.getNodes()[i].getProperty("approved").getString() == "true") {
> ...
> Bertrand tells me that in the second line this should work as well:
> if(currentNode.getNodes()[i].approved (...)
> It does not give an exception but the property is undefined.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)