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 typeAll Implemented Interfaces:
@Deprecated public class ListModelType<T> extends Object implements ComplexModelType<T>
Deprecated.Template model and polymer template support is deprecated - we recommend you to useLitTemplate
instead. Read more details from the Vaadin blog. For lit templates, you can use@Id
mapping and the component API or the element API with property synchronization instead.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
Constructors Constructor Description ListModelType(ComplexModelType<T> itemType)
Deprecated.
Creates a new list model type with the given bean model type.
-
Method Summary
All Methods Modifier and Type Method Description boolean
accepts(Type applicationType)
Deprecated.
Checks whether this type can accept application values of the given type.
StateNode
applicationToModel(Object applicationValue, PropertyFilter filter)
Deprecated.
Creates a model value representation of the provided application value.
<C> ComplexModelType<C>
cast(Class<C> proxyType)
Deprecated.
Checks that this type uses the provided proxy type and returns this type as a model type with that proxy type.
void
createInitialValue(StateNode node, String property)
Deprecated.
Create initial value for the given
property
and set it for thenode
.ComplexModelType<T>
getItemType()
Deprecated.
Gets the item type.
Type
getJavaType()
Deprecated.
Gets the Java
Type
that this model encapsulates.void
importBeans(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 boolean
isList(Type type)
Deprecated.
Checks if the given type will be handled as a list of beans in the model.
List<T>
modelToApplication(Serializable modelValue)
Deprecated.
Creates a representation of the provided model value that is intended for use in application code.
elemental.json.JsonValue
toJson()
Deprecated.
Creates a JSON representation of this model type.
-
-
-
Constructor Detail
-
ListModelType
public ListModelType(ComplexModelType<T> itemType)
Deprecated.Creates a new list model type with the given bean model type.
Parameters:
itemType
- the model type of the list items
-
-
Method Detail
-
getItemType
public ComplexModelType<T> getItemType()
Deprecated.Gets the item type.
Returns:
the item type, not
null
-
modelToApplication
public List<T> modelToApplication(Serializable modelValue)
Deprecated.Description copied from interface:
ModelType
Creates 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:
modelToApplication
in interfaceModelType
Parameters:
modelValue
- the model value to convertReturns:
a user-friendly representation of the provided model value
-
applicationToModel
public StateNode applicationToModel(Object applicationValue, PropertyFilter filter)
Deprecated.Description copied from interface:
ModelType
Creates 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:
applicationToModel
in interfaceComplexModelType<T>
Specified by:
applicationToModel
in 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
public <C> ComplexModelType<C> cast(Class<C> proxyType)
Deprecated.Description copied from interface:
ComplexModelType
Checks that this type uses the provided proxy type and returns this type as a model type with that proxy type.
Specified by:
cast
in interfaceComplexModelType<T>
Type Parameters:
C
- the proxy typeParameters:
proxyType
- the proxy type to cast toReturns:
this model type
-
isList
public static boolean isList(Type type)
Deprecated.Checks if the given type will be handled as a list of beans in the model.
Parameters:
type
- the type to checkReturns:
true
if the given type will be handled as a list of beans,false
otherwise
-
importBeans
public void importBeans(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.
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
public boolean accepts(Type applicationType)
Deprecated.Description copied from interface:
ModelType
Checks 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
public Type getJavaType()
Deprecated.Description copied from interface:
ModelType
Gets the Java
Type
that this model encapsulates.Specified by:
getJavaType
in interfaceModelType
Returns:
the java type
-
toJson
public elemental.json.JsonValue toJson()
Deprecated.Description copied from interface:
ModelType
Creates a JSON representation of this model type.
-
createInitialValue
public void createInitialValue(StateNode node, String property)
Deprecated.Description copied from interface:
ModelType
Create initial value for the given
property
and set it for thenode
.Specified by:
createInitialValue
in interfaceModelType
Parameters:
node
- the node where the initial value should be set theproperty
property
- the property in thenode
whose initial value needs to be created
-
-