I've rebuilt sling trunk and it appears to be working as expected now. Thank you.
Most of why I wanted the full node dump was so I could find out what properties were defined on a node during development, I think the jcr explorer will better address that though. On Fri, Jun 12, 2009 at 11:24:35PM +0200, Felix Meschberger wrote: > Hi Stuart, > > After re-reading the JsonQueryServlet, I saw the bug. It is not related > to any JCR query stuff but to how we add properties to the result as per > the property parameters. This is done by only accessing the property > value as a single value which fails for multi-value properties ... > > I created SLING-1006 [1] to track this and will commit a fix shortly. > > Do you still need the full node dump functionality ? > > Regards > Felix > > [1] https://issues.apache.org/jira/browse/SLING-1006 > > D. Stuart Freeman schrieb: > > On Fri, Jun 12, 2009 at 08:18:01PM +0200, Felix Meschberger wrote: > >> Hi Stuart, > >> > >> > >> D. Stuart Freeman schrieb: > >>> I'm trying to get back a multivalued property from the JSON Query > >>> Servlet, but it appears that that doesn't work. Here's what I did: > >>> > >>> curl -Ftitle="some title text" -Ftext="some body text content" \ > >>> -Ftest="1" -Ftest="2" http://admin:ad...@localhost:8080/some/new/content > >>> > >>> That posts successfully, and I can view it at > >>> http://localhost:8080/some/new/content.json and see that test is > >>> ["1","2"]. If I try to find it with JQS though at > >>> http://localhost:8080/some.query.json?queryType=xpath&statement=/jcr:root/some/new/*&property=title&property=test > >>> > >>> The title property is correctly displayed, but test is shown as "". Is > >>> this a known issue, or should I open a Jira? > >> This is a fundamental problem of JCR Query: Multi-value properties are > >> not returned in the Query rows. There is nothing Sling can do about it, > >> unfortunately. > >> > >> > >>> Also, is there a way to request that the JQS return all defined > >>> properties on a node? > >> Using the JsonQuery servlet you list explicitly the properties, which > >> you want to get back. This servlet cannot return all properties of a > >> node, right now. > >> > >> I could imagine though, that we could provide an enhancement of the > >> JsonQueryServlet, which would return the contents of the QueryResult > >> rows but the contents of the nodes matching the query. > >> > >> This would also allow you to get back the multi-value properties, since > >> those values would be access through the matching node directly. > >> > >> WDYT ? > > > > That sounds like exactly what I would need. > > > >> Regards > >> Felix > > -- D. Stuart Freeman Georgia Institute of Technology
signature.asc
Description: Digital signature