@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 BeanLocator |
beanLocator |
protected java.util.Map<java.lang.String,java.lang.Class<? extends Component>> |
classes |
protected CompositeDescriptorLoader |
compositeDescriptorLoader |
protected DatatypeRegistry |
datatypeRegistry |
protected java.util.Map<java.lang.Class,java.lang.String> |
names |
protected UserSessionSource |
userSessionSource |
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.
|
protected java.util.Locale |
getLocale() |
protected java.lang.String |
getMessagePack(java.lang.String descriptorPath) |
protected java.lang.String |
getPackage(java.lang.Class<? extends Component> componentClass) |
protected void |
initCompositeComponent(Component instance,
java.lang.Class<? extends Component> componentClass) |
protected Component |
processCompositeDescriptor(java.lang.Class<? extends Component> componentClass,
java.lang.String descriptorPath) |
void |
register(java.lang.String name,
java.lang.Class<? extends Component> componentClass) |
@Inject protected org.springframework.context.ApplicationContext applicationContext
@Inject protected DatatypeRegistry datatypeRegistry
@Inject protected CompositeDescriptorLoader compositeDescriptorLoader
@Inject protected UserSessionSource userSessionSource
@Inject protected BeanLocator beanLocator
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)
protected void initCompositeComponent(Component instance, java.lang.Class<? extends Component> componentClass)
protected java.lang.String getPackage(java.lang.Class<? extends Component> componentClass)
protected Component processCompositeDescriptor(java.lang.Class<? extends Component> componentClass, java.lang.String descriptorPath)
protected java.util.Locale getLocale()
protected java.lang.String getMessagePack(java.lang.String descriptorPath)
public void register(java.lang.String name, java.lang.Class<? extends Component> componentClass)