[jira] Commented: (SLING-1859) Multi-value string properties are not displayed correctly
[ https://issues.apache.org/jira/browse/SLING-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12931838#action_12931838 ] Clemens Wyss commented on SLING-1859: - If resource.adaptTo(ValueMap) fails (i.e returns null) I try your cast-approach through ResourceUtil#getValueMap, so this does not seem to be the problem. not sure you want strings, I guess you could also ask for Long[0] etc. the PropertyDefinition (Property#getDefinition()) should not only tell me if the property is mutivalued (PropertyDefinition#isMultiple()), but also the type the multiple values (PropertyDefinition#getRequiredType()), no matter whether it's empty or not. I expect to always get a Property from the ValueMap-casted resource... Maybe a false implication? Multi-value string properties are not displayed correctly - Key: SLING-1859 URL: https://issues.apache.org/jira/browse/SLING-1859 Project: Sling Issue Type: Bug Components: Extensions Affects Versions: Sling Explorer 1.0.0 Reporter: Carsten Ziegeler Assignee: Mike Müller I have a node with a multi value string property, and the explorer displays the value as [Ljava.lang.Object;@1a6b7e, together with the hint [not a property!] -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1859) Multi-value string properties are not displayed correctly
[ https://issues.apache.org/jira/browse/SLING-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12931658#action_12931658 ] Julian Sedding commented on SLING-1859: --- I don't know if this is a bug or not, but maybe you can work around your issue like this (I'm writing java, but it should be possible to convert to esp): ValueMap properties = ResourceUtil,getValueMap(resource); // guards against NPE in this and in the next line String[] property = properties.get(id, new String[0]); // not sure you want strings, I guess you could also ask for Long[0] etc. Multi-value string properties are not displayed correctly - Key: SLING-1859 URL: https://issues.apache.org/jira/browse/SLING-1859 Project: Sling Issue Type: Bug Components: Extensions Affects Versions: Sling Explorer 1.0.0 Reporter: Carsten Ziegeler Assignee: Mike Müller I have a node with a multi value string property, and the explorer displays the value as [Ljava.lang.Object;@1a6b7e, together with the hint [not a property!] -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1859) Multi-value string properties are not displayed correctly
[ https://issues.apache.org/jira/browse/SLING-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12931146#action_12931146 ] Clemens Wyss commented on SLING-1859: - the given behavior arises when a multivalued property is empty. In that case (esp code follows): var properties = resource.adaptTo(Packages.org.apache.sling.api.resource.ValueMap); ... var property = properties.get( id, Packages.javax.jcr.Property ); ... property is null!, i.e. cannot be casted. Is this a bug, or am I doing something wrong? Multi-value string properties are not displayed correctly - Key: SLING-1859 URL: https://issues.apache.org/jira/browse/SLING-1859 Project: Sling Issue Type: Bug Components: Extensions Affects Versions: Sling Explorer 1.0.0 Reporter: Carsten Ziegeler Assignee: Mike Müller I have a node with a multi value string property, and the explorer displays the value as [Ljava.lang.Object;@1a6b7e, together with the hint [not a property!] -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1859) Multi-value string properties are not displayed correctly
[ https://issues.apache.org/jira/browse/SLING-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12929330#action_12929330 ] Mike Müller commented on SLING-1859: I can't reproduce this behaviour. Appears this with any multivalue String property or just one specific? Multi-value string properties are not displayed correctly - Key: SLING-1859 URL: https://issues.apache.org/jira/browse/SLING-1859 Project: Sling Issue Type: Bug Components: Extensions Affects Versions: Sling Explorer 1.0.0 Reporter: Carsten Ziegeler Assignee: Mike Müller I have a node with a multi value string property, and the explorer displays the value as [Ljava.lang.Object;@1a6b7e, together with the hint [not a property!] -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.