Package io.jmix.flowui.component
Class UiComponentsGenerator
java.lang.Object
io.jmix.flowui.component.UiComponentsGenerator
Factory to create UI components using
ComponentGenerationStrategy.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<ComponentGenerationStrategy>static final String -
Constructor Summary
ConstructorsConstructorDescriptionUiComponentsGenerator(List<ComponentGenerationStrategy> componentGenerationStrategies) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.Componentgenerate(ComponentGenerationContext context) Creates a component according to the givenComponentGenerationContext.protected List<ComponentGenerationStrategy>
-
Field Details
-
NAME
- See Also:
-
componentGenerationStrategies
-
-
Constructor Details
-
UiComponentsGenerator
-
-
Method Details
-
generate
Creates a component according to the givenComponentGenerationContext.Trying to find
ComponentGenerationStrategyimplementations. If at least one strategy exists, then:- Iterates over factories according to the
Orderedinterface. - Returns the first created not
nullcomponent.
- Parameters:
context- theComponentGenerationContextinstance- Returns:
- a component instance for the current client type (web or desktop)
- Throws:
IllegalArgumentException- if no component can be created for a given context
- Iterates over factories according to the
-
getComponentGenerationStrategies
-