Hi All,
I have an use case to read the jcr property of component A from the page and use that value in my service implementation and display the processed value on page when that component A is used on a page.
Can I use the @Model(adaptables = { Resource.class}) to get the resource for reading the jcr property in my service implementation (i.e can we use both @Model and @Component in my service implementation)
Is there any other way to implement the above described use cases.
Thanks in advance
Solved! Go to Solution.
Look at that article i posted - Navin contributed that code!
Hi,
check this AEM 6.3 || How to call OSGi Service in Sling Model with Service wrote by OSGi R6 Annotation
Views
Replies
Total Likes
YOu cannot mix @Model and @Component.
Views
Replies
Total Likes
Check this article -- it may help: Performing Sling Model Adaptation Using Request and Resource Objects
Views
Replies
Total Likes
You
Views
Replies
Total Likes
You can inject services directly inside the Model
Views
Replies
Total Likes
Could you please provide me the code snippet.
Views
Replies
Total Likes
Look at that article i posted - Navin contributed that code!
Thanks all
Views
Replies
Total Likes
Views
Likes
Replies