Closed paul-bjorkstrand closed 4 years ago
@paul-bjorkstrand This kind of injector is available since AEM 6.4. Please have a look at [1] for more information. As the core-components are backward compatible to AEM 6.3 this has not been integrated yet. Once we drop the support for AEM 6.3 we can migrate to this new injector.
The code pattern
is used so frequently, and is repetitive boilerplate. I think an annotation-based injection could shortcut a decent chunk of the boilerplate, mostly in the
@PostConstruct
method, but also removing the need for@ScriptVariable ValueMap properties
and@ScriptVariable Style currentStyle
.As an added bonus, it might give incentive to development teams to more often use the design dialogs, since it takes away the extra code needed to handle the defaulting to the
Style
.Additionally, having a stand-alone
@StyleValue
would make using Style properties as easy to use as Value Map properties.Potential annotation implementation:
The annotation for
@StyleValue
would be nearly identical to@ValueMapValue