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

Lars Trieloff updated SLING-427:
--------------------------------

    Attachment: SLING-427.patch

This patch adds a "length" property to the map, making it behave like an array. 
If one of your elements in the map has the key "length" and you try named 
access, you are out of luck, but this is an acceptable limitation from my point 
of view.

> [Javascript] Make ScriptableItemMap behave like an Array
> --------------------------------------------------------
>
>                 Key: SLING-427
>                 URL: https://issues.apache.org/jira/browse/SLING-427
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Lars Trieloff
>            Priority: Minor
>         Attachments: SLING-427.patch
>
>
> The ScriptableItemMap which wraps an Iterator for Javascript scripts is nice, 
> but it exposes itself as an object, not as an array, which makes it hard to 
> loop easily over the contents of the map. It would be nice if the Map could 
> expose an Array-like behavior by exposing a "length" field and allowing 
> indexed access to its contents (which is already in place)

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