I am working on an AEM site and I am trying to get the page property teaserImage
I have the follow in my Java class, but when I do a build I get a cannot find symbol error.
public String getTeaserImg() {
return this.getPageManager().getPage(url).getProperties().get("teaserImage").value;
}
But if I put a breakpoint on this similar function
public Page getPage() {
return this.getPageManager().getPage(url);
}
And then execute this.getPageManager().getPage(url).getProperties().get("teaserImage").value
in an Evulate expression window it gives me the property, so I'm not sure why on build it doesnt work when it works in this scenario.