Link Details

Link 97056 thumbnail
User 265675 avatar

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.
  • 16
  • 0
  • 1360
  • 342

Comments

Add your comment
User 190346 avatar

ilazarte replied ago:

0 votes Vote down Vote up Reply

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.

User 265675 avatar

mmarth replied ago:

1 votes Vote down Vote up Reply

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.

User 190346 avatar

ilazarte replied ago:

0 votes Vote down Vote up Reply

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!
,

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.