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/08/28 14:19:44 UTC

[jira] Updated: (SLING-291) Clarify and test access to multi-valued Properties from server-side javascript

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

Felix Meschberger updated SLING-291:
------------------------------------

          Component/s:     (was: Scripting)
                       Scripting JavaScript (Rhino)
    Affects Version/s: Scripting JavaScript 2.0.2

> Clarify and test access to multi-valued Properties from server-side javascript
> ------------------------------------------------------------------------------
>
>                 Key: SLING-291
>                 URL: https://issues.apache.org/jira/browse/SLING-291
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting JavaScript (Rhino)
>    Affects Versions: Scripting JavaScript 2.0.2
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>
> In SLING-282, Michael Marth writes:
> the property "to" is multivalued.
> in the script I do something like:
>  <%= currentNode["to"][0] %>
> if the value of "to" has only one value I seem to get back this value as one string so [0] gives me the first character. if "to" has 2 values I get back a collection so [0] gives me the first element. this is consistent with what ["to"].length gives me.
> I am not 100% sure if this is a bug (might be my lack of understanding for javascript), if so a comment on how to determine the result length of a multi-valued property would be appreciated.

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