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
Modifier and TypeFieldDescriptionprotected final List<ComponentGenerationStrategy>
static final String
-
Constructor Summary
ConstructorDescriptionUiComponentsGenerator
(List<ComponentGenerationStrategy> componentGenerationStrategies) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.Component
generate
(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
ComponentGenerationStrategy
implementations. If at least one strategy exists, then:- Iterates over factories according to the
Ordered
interface. - Returns the first created not
null
component.
- Parameters:
context
- theComponentGenerationContext
instance- 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
-