@Component(value="cuba_DataAwareComponentsTools")
public class DataAwareComponentsTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DateTimeTransformations |
dateTimeTransformations |
protected MessageTools |
messageTools |
protected MetadataTools |
metadataTools |
static java.lang.String |
NAME |
protected TimeSource |
timeSource |
protected UserSessionSource |
userSessionSource |
Constructor and Description |
---|
DataAwareComponentsTools() |
Modifier and Type | Method and Description |
---|---|
void |
checkValueSourceDatatypeMismatch(Datatype datatype,
ValueSource valueSource)
Throws IllegalArgumentException if component's
ValueSource and Datatype have different types. |
protected javax.persistence.TemporalType |
getTemporalType(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,
EntityValueSource valueSource) |
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) |
void |
setupZoneId(DateField component,
EntityValueSource valueSource) |
public static final java.lang.String NAME
@Inject protected UserSessionSource userSessionSource
@Inject protected MessageTools messageTools
@Inject protected TimeSource timeSource
@Inject protected DateTimeTransformations dateTimeTransformations
@Inject protected 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)
protected javax.persistence.TemporalType getTemporalType(MetaProperty metaProperty, java.lang.Class javaType)
public void checkValueSourceDatatypeMismatch(Datatype datatype, ValueSource valueSource)
ValueSource
and Datatype
have different types.datatype
- datatypevalueSource
- component's value sourcepublic void setupOptions(OptionsField optionsField, EntityValueSource valueSource)