Hi,

Bertrand Delacretaz schrieb:
Hi Juerg,

On Sun, Jun 29, 2008 at 11:33 PM, Juerg Meier <[EMAIL PROTECTED]> wrote:
...In JCR, I get an Item by absolute path the with Session.getItem(). How
is this done in Sling/ESP? There must be a predefined variable that
offers a getItem() or similar method, I assume?...

You could also use resource.getResourceResolver() to get a
ResourceResolver, and use its "Resource resolve(String absPath)"
method, to stay in "resource space".

This is the preferred way of accessing resources in Sling. You can always still go to the JCR item of a resource, if you really need it by adapting the resource to the Item.class (or Node.class or Property.class).

Regards
Felix

Reply via email to