Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Working with Sling Models in Adobe Experience Manager Package Not working

Avatar

Level 10

Hi,

I installed package AEM_SlingModel-1.0 (1) from https://helpx.adobe.com/experience-manager/using/sling_models.html and invoked page using http://localhost:4502/content/model.html.

It displays the window and the button "Get Sling Model Data", but when I hit this button, it is not populating the window with data.

I saw that the node /content/testsling/slingmodel with all properties assigned.

When I tried to create the page, it shows the template.templateModel.

I am using AEM 6.2.

Kindly suggest.

Thanks,

Rama.

1 Accepted Solution

Avatar

Correct answer by
Employee
5 Replies

Avatar

Level 10

I saw that the Package  "adobe Bundleorg.kalyan.poc.sling.poc-bundle" is in Installed state and not Active state.

When I clicked the package, I see this in RED "mported Packages javax.inject,version=[0.0,1) -- Cannot be resolved".

Something to do with pm?

Kindly suggest.

Thanks,

Rama.

Avatar

Employee

Add the following dependency to your core/pom.xml

        <dependency>

            <groupId>javax.inject</groupId>

            <artifactId>javax.inject</artifactId>

            <version>1</version>

            <scope>provided</scope>

        </dependency>

Avatar

Level 10

Hi,

I installed package AEM_SlingModel-1.0 (1) from https://helpx.adobe.com/experience-manager/using/sling_models.html.

Kindly suggest where I could find pom.xml, so that I could update it.

My other interconnected question is in situations like this, where I get the installation package, is it possible to get all the source files etc on to my Eclipse, so that I could take control?

Appreciate your support.

Thanks,

Rama.

Avatar

Correct answer by
Employee

Avatar

Level 10

Hi,

Thanks for pointing out the right URL.

It works fine now.

Appreciate all your support.

Thanks,

Rama.