[
https://issues.apache.org/jira/browse/SLING-6085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Feike Visser updated SLING-6085:
--------------------------------
Summary: resource.getValueMap() to unavailable in Sightly JS-code (was:
resource.getValueMap() to available in Sighty JS-code)
> resource.getValueMap() to unavailable in Sightly JS-code
> --------------------------------------------------------
>
> Key: SLING-6085
> URL: https://issues.apache.org/jira/browse/SLING-6085
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Reporter: Feike Visser
>
> In Sightly JS-api you can't use resource.getValueMap() method, looks like it
> is unavailable.
> There you need to do this workaround to get to the properties
> {code}
> "use strict";
> use(function () {
> var parent = resource.getParent();
> var props =
> parent.adaptTo(Packages.org.apache.sling.api.resource.ValueMap);
> return props.get("jcr:createdBy","");
> });
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)