Package com.vaadin.flow.templatemodel
Class ListModelType<T>
java.lang.Object
com.vaadin.flow.templatemodel.ListModelType<T>
- Type Parameters:
T- the proxy type used by the bean type of this type
- All Implemented Interfaces:
ComplexModelType<T>,ModelType,Serializable
Deprecated.
A model type corresponding to a list of bean types.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionListModelType(ComplexModelType<T> itemType) Deprecated.Creates a new list model type with the given bean model type. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Checks whether this type can accept application values of the given type.applicationToModel(Object applicationValue, PropertyFilter filter) Deprecated.Creates a model value representation of the provided application value.<C> ComplexModelType<C>Deprecated.Checks that this type uses the provided proxy type and returns this type as a model type with that proxy type.voidcreateInitialValue(StateNode node, String property) Deprecated.Create initial value for the givenpropertyand set it for thenode.Deprecated.Gets the item type.Deprecated.Gets the JavaTypethat this model encapsulates.voidimportBeans(ModelList modelList, List<T> beans, PropertyFilter propertyFilter) Deprecated.Imports beans into a model list based on the properties in the item type of this model type.static booleanDeprecated.Checks if the given type will be handled as a list of beans in the model.modelToApplication(Serializable modelValue) Deprecated.Creates a representation of the provided model value that is intended for use in application code.elemental.json.JsonValuetoJson()Deprecated.Creates a JSON representation of this model type.
-
Constructor Details
-
ListModelType
Deprecated.Creates a new list model type with the given bean model type.- Parameters:
itemType- the model type of the list items
-
-
Method Details
-
getItemType
Deprecated.Gets the item type.- Returns:
- the item type, not
null
-
modelToApplication
Deprecated.Description copied from interface:ModelTypeCreates a representation of the provided model value that is intended for use in application code. For mutable values, this is typically a proxy that is directly connected to the underlying model value.- Specified by:
modelToApplicationin interfaceModelType- Parameters:
modelValue- the model value to convert- Returns:
- a user-friendly representation of the provided model value
-
applicationToModel
Deprecated.Description copied from interface:ModelTypeCreates a model value representation of the provided application value.For application values that contain properties (i.e. beans), the provided filter is used to determine which properties from the bean should be included in the model representation.
- Specified by:
applicationToModelin interfaceComplexModelType<T>- Specified by:
applicationToModelin interfaceModelType- Parameters:
applicationValue- the user value to convertfilter- the filter to use to determine which properties to include, notnull- Returns:
- a model value representation of the provided user value.
-
cast
Deprecated.Description copied from interface:ComplexModelTypeChecks that this type uses the provided proxy type and returns this type as a model type with that proxy type.- Specified by:
castin interfaceComplexModelType<T>- Type Parameters:
C- the proxy type- Parameters:
proxyType- the proxy type to cast to- Returns:
- this model type
-
isList
Deprecated.Checks if the given type will be handled as a list of beans in the model.- Parameters:
type- the type to check- Returns:
trueif the given type will be handled as a list of beans,falseotherwise
-
importBeans
Deprecated.Imports beans into a model list based on the properties in the item type of this model type.- Parameters:
modelList- the model list to import beans intobeans- the list of beans to importpropertyFilter- defines which properties from the item model type to import
-
accepts
Deprecated.Description copied from interface:ModelTypeChecks whether this type can accept application values of the given type. The method only considers this actual type, not the types of sub properties or list items. -
getJavaType
Deprecated.Description copied from interface:ModelTypeGets the JavaTypethat this model encapsulates.- Specified by:
getJavaTypein interfaceModelType- Returns:
- the java type
-
toJson
public elemental.json.JsonValue toJson()Deprecated.Description copied from interface:ModelTypeCreates a JSON representation of this model type. -
createInitialValue
Deprecated.Description copied from interface:ModelTypeCreate initial value for the givenpropertyand set it for thenode.- Specified by:
createInitialValuein interfaceModelType- Parameters:
node- the node where the initial value should be set thepropertyproperty- the property in thenodewhose initial value needs to be created
-
LitTemplateinstead. Read more details from the Vaadin blog. For lit templates, you can use@Idmapping and the component API or the element API with property synchronization instead.