Package com.vaadin.flow.templatemodel
Class TemplateModelUtil
java.lang.Object
com.vaadin.flow.templatemodel.TemplateModelUtil
Deprecated.
Utility class for mapping Bean values to
TemplateModel values.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptiongetFilterFromIncludeExclude(Method method) Deprecated.Gets a filter based on any@Includeand/or@Excludeannotations present on the given method.static <R> RresolveBeanAndRun(TemplateModel model, String modelPath, BiFunction<BeanModelType<?>, com.vaadin.flow.internal.nodefeature.ElementPropertyMap, R> callback) Deprecated.Resolves a bean model type and model map based on a model instance and passes those values to the provided callback.static <R> RresolveListAndRun(TemplateModel model, String modelPath, BiFunction<ListModelType<?>, com.vaadin.flow.internal.nodefeature.ModelList, R> callback) Deprecated.Resolves a list model type and a model list based on a model instance and passes those to the provided callback.
-
Method Details
-
resolveBeanAndRun
public static <R> R resolveBeanAndRun(TemplateModel model, String modelPath, BiFunction<BeanModelType<?>, com.vaadin.flow.internal.nodefeature.ElementPropertyMap, R> callback) Deprecated.Resolves a bean model type and model map based on a model instance and passes those values to the provided callback.- Type Parameters:
R- the return type- Parameters:
model- the model instance for which to resolve a type and a map, notnullmodelPath- the model path to resolve, notnullcallback- the callback to run with the resolved bean type and the model map, notnull- Returns:
- the value returned by the callback
-
resolveListAndRun
public static <R> R resolveListAndRun(TemplateModel model, String modelPath, BiFunction<ListModelType<?>, com.vaadin.flow.internal.nodefeature.ModelList, R> callback) Deprecated.Resolves a list model type and a model list based on a model instance and passes those to the provided callback.- Type Parameters:
R- the return type- Parameters:
model- the model instance for which to resolve a type and a list, notnullmodelPath- the model path to resolve, notnullcallback- the callback to run with the resolved list type and model list, notnull- Returns:
- the value returned by the callback
-
getFilterFromIncludeExclude
Deprecated.Gets a filter based on any@Includeand/or@Excludeannotations present on the given method.- Parameters:
method- the method to check- Returns:
- a filter based on the given annotations
-
LitTemplateinstead. Read more details from the Vaadin blog.