Created
June 21, 2020 15:15
-
-
Save theopendle/d9b0c4bd3bfdde9f59c2834cbdc76143 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Model( | |
| adaptables = Resource.class, | |
| adapters = DemoModel.class, | |
| resourceType = DemoModelImpl.RESOURCE_TYPE, | |
| defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL | |
| ) | |
| public class DemoModelImpl implements DemoModel { | |
| public static final String RESOURCE_TYPE = "demo/components/content/demo"; | |
| @Inject | |
| private String textInjected; | |
| @Inject | |
| @Named("text") | |
| private String textInjectedNamed; | |
| @ValueMapValue | |
| private String textMapValue; | |
| @ValueMapValue(name = "text") | |
| private String textMapValueName; | |
| @ValueMapValue | |
| @Named("text") | |
| private String textMapValueNamed; | |
| @Getter | |
| private String output; | |
| @PostConstruct | |
| protected void init() { | |
| output = "textInjected: " + textInjected | |
| + "\ntextInjectedNamed: " + textInjectedNamed | |
| + "\ntextMapValue: " + textMapValue | |
| + "\ntextMapValueName: " + textMapValueName | |
| + "\ntextMapValueNamed: " + textMapValueNamed; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment