sling model choice

Avatar

Avatar

kusumam24182037

Avatar

kusumam24182037

kusumam24182037

27-08-2019

Hi,

I have created sling model for the component.

While creating the sling model i need to specify the

@Model(adaptables = Resource.class) or @Model(adaptables=slinghttpservletrequest)

On what bases we have to select the adaptables.

I am new to AEM Kindly explain in detail to understand the concept.

Regards

Kusuma M

View Entire Topic

Avatar

Avatar

scottm91515441

Avatar

scottm91515441

scottm91515441

31-08-2019

If you want to read the values that an author enters into a component dialog, then:

@Model(adaptables = Resource.class)

will be fine. For more on working with Sling Models on 6.5 - see this article -- Building Experience Manager 6.5 Components using Granite/Coral Resource Types