Package io.jmix.ui.sys.registration
Class ComponentRegistrationBuilder
java.lang.Object
io.jmix.ui.sys.registration.ComponentRegistrationBuilder
Builds registration object that is used for adding or overriding UI components in the framework
For instance:
@Configuration public class ComponentConfiguration { @Bean public ComponentRegistration extButton() { return ComponentRegistrationBuilder.create(ExtButton.NAME) .withComponentClass(ExtWebButton.class) .withComponentLoaderClass(ExtButtonLoader.class) .build(); } }
-
Field Summary
Modifier and TypeFieldDescriptionprotected Class<? extends ComponentLoader>
protected String
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static ComponentRegistrationBuilder
withComponentClass
(Class<? extends Component> componentClass) Sets component class.withComponentLoaderClass
(Class<? extends ComponentLoader> componentClassLoader) Sets component loader class.Sets component name in the screen descriptor.
-
Field Details
-
name
-
tag
-
componentClass
-
componentClassLoader
-
-
Constructor Details
-
ComponentRegistrationBuilder
- Parameters:
name
- component name
-
-
Method Details
-
create
- Parameters:
name
- component name- Returns:
- builder instance
-
withTag
Sets component name in the screen descriptor. If tag isnull
or empty registration object will set tag = name.- Parameters:
tag
- element name- Returns:
- builder instance
-
withComponentClass
Sets component class.- Parameters:
componentClass
- component class- Returns:
- builder instance
-
withComponentLoaderClass
public ComponentRegistrationBuilder withComponentLoaderClass(Class<? extends ComponentLoader> componentClassLoader) Sets component loader class.- Parameters:
componentClassLoader
- component loader class- Returns:
- builder instance
-
build
- Returns:
- instance of registration object
-