@Component(value="cuba_ComponentsFactory") public class WebComponentsFactory extends java.lang.Object implements ComponentsFactory
| Modifier and Type | Field and Description |
|---|---|
protected UiComponents |
uiComponents |
protected UiComponentsGenerator |
uiComponentsGenerator |
NAME| Constructor and Description |
|---|
WebComponentsFactory() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Component> |
createComponent(java.lang.Class<T> type)
Create a component instance by its type.
|
Component |
createComponent(ComponentGenerationContext context)
Creates a component according to the given
ComponentGenerationContext. |
<T extends Component> |
createComponent(java.lang.String name)
Create a component instance by its name.
|
Timer |
createTimer()
Create a timer instance.
|
@Inject protected UiComponents uiComponents
@Inject protected UiComponentsGenerator uiComponentsGenerator
public <T extends Component> T createComponent(java.lang.String name)
ComponentsFactorycreateComponent in interface ComponentsFactoryname - component name. It is usually defined in NAME constant inside the component interface,
e.g. Label.NAME.
It is also usually equal to component's XML name.public <T extends Component> T createComponent(java.lang.Class<T> type)
ComponentsFactorycreateComponent in interface ComponentsFactorytype - component typepublic Component createComponent(ComponentGenerationContext context)
ComponentsFactoryComponentGenerationContext.
Trying to find ComponentGenerationStrategy implementations. If at least one strategy exists, then:
Ordered interface.null component.createComponent in interface ComponentsFactorycontext - the ComponentGenerationContext instancepublic Timer createTimer()
ComponentsFactorycreateTimer in interface ComponentsFactory