By mmarth
via dev.day.com
Published: Jul 22 2008 / 11:50
Lars Trieloff has compiled an excellent cheat sheet for Apache Sling (the JCR-based web framework that was just released). Very useful to get started.
Comments
ilazarte replied ago:
Lookin good! What I'm still not quite clear on with Sling is how to execute a search for content nodes via a Get. I'm not quite sure that feature is there yet; or whether by design its something I'd have to do within the script (js/jsp) files.
mmarth replied ago:
Search via get without scripts is supported, but a but low-profile at the moment (there are some tickets open so the API might change). Usage is e.g.
GET /content.query.json?statement=//*[jcr:contains(.,'test')]
(statement contains the xpath query. For sql queries add request parameter queryType=sql). This will return json data. All parameters can be seen in the source code here: http://svn.apache.org/repos/asf/incubator/sling/trunk/servlets/get/src/main/java/org/apache/sling/servlets/get/JsonQueryServlet.java
But, simply adding a five line script (js or jsp) also works, of course.
ilazarte replied ago:
ah, exactly what i was looking for. I'm gonna dig around with this in a bit. I saw that a similar question was posted to the sling-dev list. Exciting stuff!
,
Voters For This Link (16)
Voters Against This Link (0)