@Component(value="cuba_UiComponents") public class WebUiComponents extends java.lang.Object implements UiComponents
Modifier and Type | Field and Description |
---|---|
protected org.springframework.context.ApplicationContext |
applicationContext |
protected java.util.Map<java.lang.String,java.lang.Class<? extends Component>> |
classes |
protected com.haulmont.chile.core.datatypes.DatatypeRegistry |
datatypeRegistry |
protected java.util.Map<java.lang.Class,java.lang.String> |
names |
NAME
Constructor and Description |
---|
WebUiComponents() |
Modifier and Type | Method and Description |
---|---|
protected void |
autowireContext(Component instance) |
<T extends Component> |
create(java.lang.Class<T> type)
Create a component instance by its type.
|
<T extends Component> |
create(java.lang.String name)
Create a component instance by its name.
|
<T extends Component> |
create(com.google.common.reflect.TypeToken<T> type)
Create a component instance by its type.
|
void |
register(java.lang.String name,
java.lang.Class<? extends Component> componentClass) |
@Inject protected org.springframework.context.ApplicationContext applicationContext
@Inject protected com.haulmont.chile.core.datatypes.DatatypeRegistry datatypeRegistry
protected java.util.Map<java.lang.String,java.lang.Class<? extends Component>> classes
protected java.util.Map<java.lang.Class,java.lang.String> names
public <T extends Component> T create(java.lang.String name)
UiComponents
create
in interface UiComponents
name
- 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 create(java.lang.Class<T> type)
UiComponents
create
in interface UiComponents
type
- component typepublic <T extends Component> T create(com.google.common.reflect.TypeToken<T> type)
UiComponents
create
in interface UiComponents
type
- component type tokenLabel.TYPE_DEFAULT
,
TextField.TYPE_DEFAULT
protected void autowireContext(Component instance)
public void register(java.lang.String name, java.lang.Class<? extends Component> componentClass)