@ComponentSpecification public interface UiWidgetFactoryDatatype extends AbstractUiWidgetFactoryDatatype
create widgets for particular
datatypes
. You will typically use UiContext
that extends this interface.Modifier and Type | Method and Description |
---|---|
<VALUE> UiWidgetField<VALUE> |
createForDatatype(Class<VALUE> datatype)
This method creates a new instance of the
field widget to view and edit the given
datatype . |
boolean |
isDatatypeSupported(Class<?> type)
This method determines if the given
Class is supported by createForDatatype(Class) . |
static final String CDI_NAME
CDI name
.<VALUE> UiWidgetField<VALUE> createForDatatype(Class<VALUE> datatype)
field widget
to view and edit the given
datatype
. custom datatypes
(e.g. CustomerNumber) and use them in your data-model to make it more
expressive. For each datatype you are using (including standard datatypes such as String
as well
as complex datatypes that require a composition of multiple widgets) you can register a sub-factory for
each datatype and then consequently use this method in your presentation code to receive the proper
field widget
. The end-user will thank you for a consistent UI (where the
CustomerNumber is viewed and edited in exactly the same way in each dialog). Also you can stay
(a lot more) relaxed in case a change request comes up that CustomerNumber has to change its
format and validation rules in the entire application (with data-model and UI).createForDatatype
in interface AbstractUiWidgetFactoryDatatype
VALUE
- is the generic type of the Datatype
.datatype
- is the Datatype
.field widget
to display and edit the specified
datatype
.Copyright © 2001–2014 mmm-Team. All rights reserved.