Skip to content

Instantly share code, notes, and snippets.

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

すごい

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