@Component(value="ui_DataAwareComponentsTools")
public class DataAwareComponentsTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected io.jmix.core.security.CurrentAuthentication |
currentAuthentication |
protected io.jmix.core.DateTimeTransformations |
dateTimeTransformations |
protected io.jmix.core.MessageTools |
messageTools |
protected io.jmix.core.MetadataTools |
metadataTools |
protected io.jmix.core.TimeSource |
timeSource |
Constructor and Description |
---|
DataAwareComponentsTools() |
Modifier and Type | Method and Description |
---|---|
void |
checkValueSourceDatatypeMismatch(io.jmix.core.metamodel.datatype.Datatype datatype,
ValueSource valueSource)
Throws IllegalArgumentException if component's
ValueSource and Datatype have different types. |
protected javax.persistence.TemporalType |
getTemporalType(io.jmix.core.metamodel.model.MetaProperty metaProperty,
java.lang.Class javaType) |
void |
setupCaseConversion(TextInputField.CaseConversionSupported component,
EntityValueSource valueSource)
Sets case conversion using
CaseConversion annotation on entity property. |
void |
setupDateFormat(DateField component,
java.lang.Class valueType) |
void |
setupDateFormat(DateField component,
EntityValueSource valueSource) |
void |
setupDateFormat(DateField component,
io.jmix.core.metamodel.model.MetaProperty metaProperty) |
void |
setupDateRange(HasRange component,
EntityValueSource valueSource) |
void |
setupMaxLength(TextInputField.MaxLengthLimited component,
EntityValueSource valueSource)
Sets max length for textual UI component using Entity metadata.
|
void |
setupOptions(OptionsField optionsField,
EntityValueSource valueSource) |
protected void |
setupTemporalType(DateField component,
javax.persistence.TemporalType temporalType) |
void |
setupZoneId(DateField component,
EntityValueSource valueSource) |
@Autowired protected io.jmix.core.security.CurrentAuthentication currentAuthentication
@Autowired protected io.jmix.core.MessageTools messageTools
@Autowired protected io.jmix.core.TimeSource timeSource
@Autowired protected io.jmix.core.DateTimeTransformations dateTimeTransformations
@Autowired protected io.jmix.core.MetadataTools metadataTools
public void setupCaseConversion(TextInputField.CaseConversionSupported component, EntityValueSource valueSource)
CaseConversion
annotation on entity property.component
- UI componentvalueSource
- value sourcepublic void setupMaxLength(TextInputField.MaxLengthLimited component, EntityValueSource valueSource)
component
- UI componentvalueSource
- value sourcepublic void setupDateRange(HasRange component, EntityValueSource valueSource)
public void setupZoneId(DateField component, EntityValueSource valueSource)
public void setupDateFormat(DateField component, EntityValueSource valueSource)
public void setupDateFormat(DateField component, io.jmix.core.metamodel.model.MetaProperty metaProperty)
public void setupDateFormat(DateField component, java.lang.Class valueType)
@Nullable protected javax.persistence.TemporalType getTemporalType(@Nullable io.jmix.core.metamodel.model.MetaProperty metaProperty, java.lang.Class javaType)
protected void setupTemporalType(DateField component, @Nullable javax.persistence.TemporalType temporalType)
public void checkValueSourceDatatypeMismatch(@Nullable io.jmix.core.metamodel.datatype.Datatype datatype, @Nullable ValueSource valueSource)
ValueSource
and Datatype
have different types.datatype
- datatypevalueSource
- component's value sourcepublic void setupOptions(OptionsField optionsField, EntityValueSource valueSource)