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