Aem 如何在吊索模型中获取设计对话框属性?
我有一个设计对话框,其中的值存储在etc/design/。但是现在我应该如何在Sling模型中读取这些属性呢?您可以使用脚本绑定来获取currentStyle-Aem 如何在吊索模型中获取设计对话框属性?,aem,sling-models,Aem,Sling Models,我有一个设计对话框,其中的值存储在etc/design/。但是现在我应该如何在Sling模型中读取这些属性呢?您可以使用脚本绑定来获取currentStyle- @Inject @Source("script-bindings") private Style currentStyle 然后使用- currentStyle.get("<name of the text field>",String.class) currentStyle.get(“,String.class”) 您
@Inject @Source("script-bindings")
private Style currentStyle
然后使用-
currentStyle.get("<name of the text field>",String.class)
currentStyle.get(“,String.class”)
您可以插入一个ResourceResolver Factory
,然后获取一个ResourceResolver
,然后获取所需的任何属性