Package io.jmix.flowui.data
Class DataAwareComponentsTools
java.lang.Object
io.jmix.flowui.data.DataAwareComponentsTools
Utility bean that provides typical data aware operations with UI components.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CurrentAuthentication
protected final DateTimeTransformations
protected final MessageTools
protected final MetadataTools
protected final TimeSource
-
Constructor Summary
ConstructorDescriptionDataAwareComponentsTools
(CurrentAuthentication currentAuthentication, MessageTools messageTools, TimeSource timeSource, DateTimeTransformations dateTimeTransformations, MetadataTools metadataTools) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> Optional<T>
getMaxRange
(Object currentMaxValue, EntityValueSource<?, ?> valueSource, Class<T> datatype) protected <T> Optional<T>
getMinRange
(Object currentMinValue, EntityValueSource<?, ?> valueSource, Class<T> datatype) protected jakarta.persistence.TemporalType
getTemporalType
(MetaProperty metaProperty, Class<?> javaType) void
setupLength
(HasLengthLimited component, EntityValueSource<?, ?> valueSource) Sets length limits for textual UI component using Entity metadata.void
setupRange
(com.vaadin.flow.component.datepicker.DatePicker component, EntityValueSource<?, ?> valueSource) Sets the selectable date range inLocalDate
format forDatePicker
component using Entity metadata.void
setupRange
(com.vaadin.flow.component.datetimepicker.DateTimePicker component, EntityValueSource<?, ?> valueSource) Sets the selectable date range inLocalDateTime
format forDateTimePicker
component using Entity metadata.void
setupRange
(com.vaadin.flow.component.timepicker.TimePicker component, EntityValueSource<?, ?> valueSource) Sets the selectable time range inLocalTime
format forTimePicker
component using Entity metadata.void
setupZoneId
(HasZoneId component, EntityValueSource<?, ?> valueSource)
-
Field Details
-
currentAuthentication
-
messageTools
-
timeSource
-
dateTimeTransformations
-
metadataTools
-
-
Constructor Details
-
DataAwareComponentsTools
public DataAwareComponentsTools(CurrentAuthentication currentAuthentication, MessageTools messageTools, TimeSource timeSource, DateTimeTransformations dateTimeTransformations, MetadataTools metadataTools)
-
-
Method Details
-
setupLength
Sets length limits for textual UI component using Entity metadata.- Parameters:
component
- UI componentvalueSource
- value source
-
setupZoneId
- Parameters:
component
- UI componentvalueSource
- value source
-
setupRange
public void setupRange(com.vaadin.flow.component.datetimepicker.DateTimePicker component, EntityValueSource<?, ?> valueSource) Sets the selectable date range inLocalDateTime
format forDateTimePicker
component using Entity metadata.- Parameters:
component
-DateTimePicker
componentvalueSource
- value source
-
setupRange
public void setupRange(com.vaadin.flow.component.datepicker.DatePicker component, EntityValueSource<?, ?> valueSource) Sets the selectable date range inLocalDate
format forDatePicker
component using Entity metadata.- Parameters:
component
-DatePicker
componentvalueSource
- value source
-
setupRange
public void setupRange(com.vaadin.flow.component.timepicker.TimePicker component, EntityValueSource<?, ?> valueSource) Sets the selectable time range inLocalTime
format forTimePicker
component using Entity metadata.- Parameters:
component
-TimePicker
componentvalueSource
- value source
-
getMaxRange
protected <T> Optional<T> getMaxRange(@Nullable Object currentMaxValue, EntityValueSource<?, ?> valueSource, Class<T> datatype) -
getMinRange
protected <T> Optional<T> getMinRange(@Nullable Object currentMinValue, EntityValueSource<?, ?> valueSource, Class<T> datatype) -
getTemporalType
@Nullable protected jakarta.persistence.TemporalType getTemporalType(@Nullable MetaProperty metaProperty, Class<?> javaType)
-