Hi all,
I'm working on an AEM component and trying to get a property from the dialog using Sling Models. Here's a snippet of my code:
@Model(adaptables = Resource.class)
public class MyComponentModel {
@inject
private String title;
public String getTitle() {
return title;
}
}
However, when I try to use this model in my HTL file like this:
<div data-sly-use.model="com.myproject.models.MyComponentModel">
${model.title}
</div>
The title is always showing as null, even though I have set it in the dialog. Can anyone help me understand what’s going wrong?