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

Felix Meschberger commented on SLING-329:
-----------------------------------------

this is AFAIK a limitation of JavaScript, where an object property may be 
accessed by a numeric index or by a string name. In your case, JavaScript 
rightfully so (probably) assumes the number to be numeric and access the 
property by numeric index. To force using the index as a string you solve the 
issue by explicitly creating a string of the number.

Not sure though.

> cannot access node when node name is a number
> ---------------------------------------------
>
>                 Key: SLING-329
>                 URL: https://issues.apache.org/jira/browse/SLING-329
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Michael Marth
>            Priority: Minor
>
> the line
> currentNode.getNodes()[i].getProperty("approved").getString()
> gives
> TypeError: Cannot call method "getProperty" of undefined 
> (/apps/tss/list/html.esp#8) (500)
> If the node name consists of numbers only (like "111111" - but "1aaaa" is OK)

-- 
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