documentation
documentation copied to clipboard
Document @Install and its usages in components
Environment
- Documentation version: Snapshot
- Part of the documentation: Manual
Description
If you search "@ Install" in existing documentation - it's not well documented (idea, purpose, usages in components).
As an example - Table.Column delegates (formatter, columnGenerator, valueProvider) are not mentioned in documentation at all.
Add @Subscribe and @Install to https://doc.cuba-platform.com/manual-7.0/screen_controller_annotations.html
Also for methods like setOptionImageProvider() (i.e. setters of providers) add examples of using them with @Install (by generating this code in Studio "Handlers" tab):
@Inject
private Image imageResource;
@Install(to = "fooLookupField", subject = "optionImageProvider")
private Resource fooLookupFieldOptionImageProvider(Foo foo) {
String iconName = Boolean.TRUE.equals(foo.getStatus()) ? "icons/active.svg" : "icons/inactive.svg";
return imageResource.createResource(ThemeResource.class).setPath(iconName);
}