since ‎25-05-2019
‎12-01-2021
ashokkumarmarni
Level 1
Re: Is this possible to get .model.json from content path in Java class instead of hitting absolute url and get response?
Avatar

ashokkumarmarni

ashokkumarmarni
- Adobe Experience Manager
Hi Jörg Hoh,Thank you for your support !We have modified sling model adaptables to both request and resource to make sure it works for both. We are able to read required values from sling model as below. Resource r = resourceResolver.getResource("/content/myproject/mypage");MyModel model = ModelFactory.createModel (r, MyModel.class);MyModel model = ModelFactory.createModel (r, MyModel.class);JSONObject completeObj = new JSONObject();completeObj.put("title", model.getTitle());Map componentMap = (...

Views

953

Likes

0

Replies

0
Re: Is this possible to get .model.json from content path in Java class instead of hitting absolute url and get response?
Avatar

ashokkumarmarni

ashokkumarmarni
- Adobe Experience Manager
Hi Jörg Hoh,Thank you for your response.We are able to get the sling model objet from above approach, is there a way to get the json string out of model object in our java class?

Views

956

Likes

0

Replies

0
Re: Is this possible to get .model.json from content path in Java class instead of hitting absolute url and get response?
Avatar

ashokkumarmarni

ashokkumarmarni
- Adobe Experience Manager
Hi Jörg Hoh,I have tried above approach, I am ending up with below exceptionCaused by: org.apache.sling.models.factory.PostConstructException: Post-construct method has thrown an exception for model class myproject.slingmodels.core.PageImplat org.apache.sling.models.impl.ModelAdapterFactory.createObject(ModelAdapterFactory.java:705)at org.apache.sling.models.impl.ModelAdapterFactory.internalCreateModel(ModelAdapterFactory.java:394)at org.apache.sling.models.impl.ModelAdapterFactory.createModel(M...

Views

952

Likes

0

Replies

0
Is this possible to get .model.json from content path in Java class instead of hitting absolute url and get response?
Avatar

ashokkumarmarni

ashokkumarmarni
- Adobe Experience Manager
Hi All,Is there a way to get the /content/my-project/mypage.model.json directly from content path within AEM OSGI service, instead of hitting absolute url http://localhost:4502/content/my-project/mypage.model.json We do get html of a page with below code snippetHttpServletRequest httpRequest = requestResponseFactory.createRequest("GET", location);HttpServletResponse httpResponse = requestResponseFactory.createResponse(out);requestProcessor.processRequest(httpRequest, httpResponse, resourceResolv...

Views

1.8K

Like

1

Replies

7
Unable to export content from extended core components at page level using jackson exporter.
Avatar

ashokkumarmarni

ashokkumarmarni
- Adobe Experience Manager
Hi All !I am trying to acheive customised model.json from extended core components and their sling models at page level. below are the steps being followed.Extending Adobe Experience Manager Core Components to extend core component and its sling model using delegation patternAdobe Experience Manager Help | Developing Sling Model Exporters in AEM to get sling model exporter using jackson exporterAdobe Experience Manager Help | Getting Started with AEM Content Services to get CAAS out of extended ...

Views

395

Likes

0

Replies

0
Relation between folders and crx/de and crx-quickstart folder
Avatar

ashokkumarmarni

ashokkumarmarni
- Adobe Experience Manager
Hi There,could someone explain what is the link between folders in crx/de and crx-quickstart folder? e.g where components from /apps/my-project/components will get saved in crx-quickstart folder and in which format.

Views

461

Likes

0

Replies

1
AEM 6.x crx-quickstart folder structure
Avatar

ashokkumarmarni

ashokkumarmarni
- Adobe Experience Manager
Can someone help me to understand what exactly the role of each folder inside crx-quickstart/, also what is available in each folder.

Views

666

Likes

0

Replies

1
Likes from