[ 
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)

Reply via email to