You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (JIRA)" <ji...@apache.org> on 2015/08/17 14:14:46 UTC

[jira] [Resolved] (SLING-4953) Enhance the JavaScript API provided by the org.apache.sling.scripting.javascript bundle

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

Radu Cotescu resolved SLING-4953.
---------------------------------
    Resolution: Fixed

Fixed in [r1696254|https://svn.apache.org/viewvc?view=revision&revision=1696254].

> Enhance the JavaScript API provided by the org.apache.sling.scripting.javascript bundle
> ---------------------------------------------------------------------------------------
>
>                 Key: SLING-4953
>                 URL: https://issues.apache.org/jira/browse/SLING-4953
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>    Affects Versions: Scripting JavaScript 2.0.22
>            Reporter: Radu Cotescu
>            Assignee: Radu Cotescu
>             Fix For: Scripting JavaScript 2.0.24
>
>
> The JavaScript API provided by the {{org.apache.sling.scripting.javascript}} bundle should be enhanced to provide easier access to map values:
> {noformat}
> // assuming properties is a java.util.Map
> properties.name === properties.get('name')
> properties['jcr:createdBy'] === properties.get('jcr:createdBy')
> {noformat}
> Consequently, the {{Resource}} host object should provide support for obtaining the resource's properties directly:
> {noformat}
> resource.properties === resource.adaptTo(Packages.org.apache.sling.api.resource.ValueMap)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)