You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Jean-Christophe Kautzmann <jk...@adobe.com> on 2010/12/07 16:50:12 UTC
Tutorial "Getting Resources and Properties in Sling"
Hi,
FYI: I added a page to the Sling tutorials on how to get resources and
properties in Sling [1], after validating with Felix.
Shall I announce it on users@sling.apache.org?
Cheers JC
[1]
http://sling.apache.org/site/getting-resources-and-properties-in-sling.html
Re: Tutorial "Getting Resources and Properties in Sling"
Posted by Jean-Christophe Kautzmann <jk...@adobe.com>.
Hi Carsten,
thx for your input. I will update the tutorial accordingly and spread
the word to the users list.
Cheers JC
On 12/8/10 2:35 PM, Carsten Ziegeler wrote:
> Hi Jean-Christophe,
>
> nice tutorial - if you like you can upgrade your tutorial to the new
> ResourceResolverFactory from the Sling API - this one allows you to get
> directly a resource resolver without requiring to create a session first.
> So you just need
> /** @scr.reference */
> private ResourceResolverFactory resolverFactory;
>
> and then you can:
> ResourceResolver resolver =
> resolverFactory.getAdministrativeResourceResolver(null);
>
>
> Feel free to spread the word and post to the users list about your tutorial.
>
> Thanks
> Carsten
>
> Jean-Christophe Kautzmann wrote
>> Hi,
>>
>> FYI: I added a page to the Sling tutorials on how to get resources and
>> properties in Sling [1], after validating with Felix.
>> Shall I announce it on users@sling.apache.org?
>>
>> Cheers JC
>>
>> [1]
>> http://sling.apache.org/site/getting-resources-and-properties-in-sling.html
>>
>>
>
Re: Tutorial "Getting Resources and Properties in Sling"
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Jean-Christophe,
nice tutorial - if you like you can upgrade your tutorial to the new
ResourceResolverFactory from the Sling API - this one allows you to get
directly a resource resolver without requiring to create a session first.
So you just need
/** @scr.reference */
private ResourceResolverFactory resolverFactory;
and then you can:
ResourceResolver resolver =
resolverFactory.getAdministrativeResourceResolver(null);
Feel free to spread the word and post to the users list about your tutorial.
Thanks
Carsten
Jean-Christophe Kautzmann wrote
> Hi,
>
> FYI: I added a page to the Sling tutorials on how to get resources and
> properties in Sling [1], after validating with Felix.
> Shall I announce it on users@sling.apache.org?
>
> Cheers JC
>
> [1]
> http://sling.apache.org/site/getting-resources-and-properties-in-sling.html
>
>
--
Carsten Ziegeler
cziegeler@apache.org