Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@Model(adaptables = Resource.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class ContactUsModel {
private Style currentStyle;
private Designer designer;
protected void init() {
// Getting the currentStyle from the Designer.class
designer = this.resourceResolver.adaptTo(Designer.class);
if (designer != null) {
currentStyle = designer.getStyle(resource);
Copy link


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment