SlingModel to get cloudconfig | Community
Skip to main content
AEMLearner-1989
Level 4
Nov 19, 2019 1:23 PM UTC
Solved

SlingModel to get cloudconfig

Hi Team,

I am using below code to get cloudconfig but configurationmanager is null here..any help ?

cloudConfig = pageProperties.getInherited("cq:cloudserviceconfigs", new String[0]);

    final Configuration configuration = configurationManager.getConfiguration("salesforce-demo", cloudConfig);

    log.info("configuration Cloud"+configuration);

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
AEMLearner-1989
AEMLearner-1989Accepted solution
Level 4
Nov 20, 2019 9:32 AM UTC

Hi,

Thanks for your reply !

I have resolved the issue with below code

ConfigurationManager cfMgr = resourcePage.getContentResource().getResourceResolver().adaptTo(ConfigurationManager.class);

2 replies

AEMLearner-1989
AEMLearner-1989AuthorAccepted solution
Level 4
Nov 20, 2019 9:32 AM UTC

Hi,

Thanks for your reply !

I have resolved the issue with below code

ConfigurationManager cfMgr = resourcePage.getContentResource().getResourceResolver().adaptTo(ConfigurationManager.class);

Translate
sunjot16
Employee
Nov 19, 2019 4:57 PM UTC