You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Justin Edelson (JIRA)" <ji...@apache.org> on 2014/02/24 18:00:33 UTC
[jira] [Comment Edited] (SLING-3413) add support for getName() and
getChildren() to JS Resource API
[ https://issues.apache.org/jira/browse/SLING-3413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13910461#comment-13910461 ]
Justin Edelson edited comment on SLING-3413 at 2/24/14 5:00 PM:
----------------------------------------------------------------
proposed patch here: https://codereview.appspot.com/68190044
Examples:
{code}
resource.name;
resource.getName();
{code}
{code}
resource.children; // returns array
resource.listChildren(); // returns map, keyed by name
resource.listChildren(function(r) {}); // invokes function for each child
{code}
was (Author: justinedelson):
proposed patch here: https://codereview.appspot.com/68000044
Examples:
{code}
resource.name;
resource.getName();
{code}
{code}
resource.children; // returns array
resource.getChildren(); // returns map, keyed by name
resource.getChildren(function(r) {}); // invokes function for each child
{code}
> add support for getName() and getChildren() to JS Resource API
> --------------------------------------------------------------
>
> Key: SLING-3413
> URL: https://issues.apache.org/jira/browse/SLING-3413
> Project: Sling
> Issue Type: Improvement
> Components: Scripting
> Reporter: Justin Edelson
> Fix For: Scripting JavaScript 2.0.14
>
>
> The JS API used to wrap Resources doesn't support getting a list of children or the resource's name. This should be added.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)