Read Desing Dialog data from sling model | Community
Skip to main content
ajinkayk6258253
Level 3
November 26, 2019
Solved

Read Desing Dialog data from sling model

  • November 26, 2019
  • 2 replies
  • 2284 views

how can i read design dialog data for a component using sling model ? i'm using static template in my project .

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AlbinIs1

Get the reference to the currentStyle

@ScriptVariable 

private Style currentStyle;

Get the properties from currentStyle

String prop1= currentStyle.get("prop1", String.class);

2 replies

Adobe Employee
November 26, 2019

You can use the "com.day.cq.wcm.api.designer.Design" API. More details at [1]

[1] Design ("The Adobe AEM Quickstart and Web Application.")

AlbinIs1Community AdvisorAccepted solution
Community Advisor
November 27, 2019

Get the reference to the currentStyle

@ScriptVariable 

private Style currentStyle;

Get the properties from currentStyle

String prop1= currentStyle.get("prop1", String.class);