Access design_dialog(currentStyle) properties from within a Sling Model
Hi,
I am trying to access currentStyle properties from within a SlingModel. The SlingModel is being called from a HTL component using data-sly-use that has a functional design_dialog and accessible currentStyle.
This was the only suggestion I could find using google:
@Inject @Source("script-bindings")
private Style currentStyle;
and then
@PostConstruct
public void init() {
String startLevel = currentStyle.get("startLevel",String.class);
}
This isn't working. Can anyone tell me what I am doing wrong??
Thank you!
Ian
