Package io.jmix.ui.component
Class UiComponentsGenerator
java.lang.Object
io.jmix.ui.component.UiComponentsGenerator
Factory to create UI components using
ComponentGenerationStrategy
.- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerate
(ComponentGenerationContext context) Creates a component according to the givenComponentGenerationContext
.protected List<ComponentGenerationStrategy>
-
Field Details
-
NAME
- See Also:
-
componentGenerationStrategies
-
-
Constructor Details
-
UiComponentsGenerator
public 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
-