[ 
https://issues.apache.org/jira/browse/SLING-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757175#action_12757175
 ] 

Carsten Ziegeler commented on SLING-1112:
-----------------------------------------

I've added a value map wrapper which should solve your problem, instead of doing
ResourceUtil.getvalueMap(resource)
you do a
new DeepResolvingValueMap(resource, ResourceUtil.getValueMap(resource))

> ValueMap doesn't allow "deep property fetching" anymore
> -------------------------------------------------------
>
>                 Key: SLING-1112
>                 URL: https://issues.apache.org/jira/browse/SLING-1112
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR Resource 2.0.6
>         Environment: Day CQ5.2.1
>            Reporter: zhangchunlong
>         Attachments: DeepResolvingValueMap.java
>
>
> ValueMap doesn't allow "deep property fetching" anymore --> Breaks our code
> In our code we use heavily deep property fetching:
> Example 1:
> final ValueMap properties = ResourceUtil.getValueMap(this.resource);
> properties.get("categories_c1/categories", String[].class);
> Example 2:
> final ValueMap map = ResourceUtil.getValueMap(resource);
> final String propertyValue = map.get("language_config/print", String.class);
> the resource points to a page which has a component (e.g. "language_config").
> Using the "/" we fetch the nested property of the component (like a 
> qualident),
> This worked fine before, now always "null" is returned.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to