You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/09/26 18:07:44 UTC

[jira] Updated: (SLING-604) Multi value properties not properly supported by ScriptableNode.get(String) method

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

Felix Meschberger updated SLING-604:
------------------------------------

    Fix Version/s:     (was: Scripting JavaScript 2.0.2)
                    Scripting JavaScript 2.1.0
         Assignee: Felix Meschberger

This didn't make it into the initial release. Retargeting for the next release.

> Multi value properties not properly supported by ScriptableNode.get(String) method
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-604
>                 URL: https://issues.apache.org/jira/browse/SLING-604
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JavaScript (Rhino)
>    Affects Versions: Scripting JavaScript 2.0.2
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For:  Scripting JavaScript 2.1.0
>
>
> It seems that mutlivalue properties are not properly supported by the ScriptableNode.get(String) method. The construct
>    someNode.prop
> should return an array of values if the property is multi-valued even in the case of the array only containing a single value.
> Paul Davis reported in [1] that the construct
>    <% for(var i=0; i <currentNode.trackId.length; i++) { %>
>        <div><%= currentNode.trackId[i] %></div>
>    <% } %>
> listed the single characters of the single value of the trackid property in case the trackid is a multi-valued property with just a single value. The actual property seems to be a proper multivalue property because
>    var items = currentNode.getProperty("trackId").values;
>    for( var i=0; i < items.length; i++ ) {
>        ...
>    }
> works correctly.
> [1] http://markmail.org/message/rbnsfolm3yq6thfv

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