Package org.cxbox.core.service.rowmeta
Class FieldMetaBuilder<T extends org.cxbox.api.data.dto.DataResponseDTO>
java.lang.Object
org.cxbox.core.service.rowmeta.FieldMetaBuilder<T>
public abstract class FieldMetaBuilder<T extends org.cxbox.api.data.dto.DataResponseDTO>
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildExtremeRowDependentMeta(RowDependentFieldsMeta<T> fields, ExtremeBcDescription bcDescription, Long id, Long parentId) voidbuildIndependentMeta(FieldsMeta<T> fields, BusinessComponent bc) abstract voidbuildIndependentMeta(FieldsMeta<T> fields, InnerBcDescription bcDescription, Long parentId) voidbuildRowDependentMeta(RowDependentFieldsMeta<T> fields, BusinessComponent bc) abstract voidbuildRowDependentMeta(RowDependentFieldsMeta<T> fields, InnerBcDescription bcDescription, Long id, Long parentId) getBc()<P extends org.cxbox.api.data.dto.DataResponseDTO,F>
FgetParentField(DtoField<P, F> dtoField, BusinessComponent bc)
-
Constructor Details
-
FieldMetaBuilder
public FieldMetaBuilder()
-
-
Method Details
-
buildRowDependentMeta
This method configures form/list fields with UI changes, taking into account the information in the row:
- Enabling field editing - the field becomes editable (editing is available in the form and in the list by double-clicking on the field)
RowDependentFieldsCommonMeta.setEnabled(DtoField[])#}- Requiring the field - the field becomes mandatory (if the form field is not filled in, an error message will appear)
RowDependentFieldsCommonMeta.setRequired(DtoField[])- Adds a drop-down list to the Radio/Dictionary field of the form with values from the enum that are suitable only for enum fields
RowDependentFieldsDictionaryMeta.setEnumValues(DtoField, Enum[])- Adds multiselect dropdown to the form field with custom values
RowDependentFieldsDictionaryDeprecatedMeta.setDictionaryTypeWithCustomValues(DtoField, String...))}- Setting up drilldown - adds link to the field
RowDependentFieldsCommonMeta.setDrilldown(DtoField, DrillDownTypeSpecifier, String)- Setting hidden - makes fields hidden (the field on the form becomes hidden)
RowDependentFieldsCommonMeta.setHidden(DtoField[])- e.t.c
You can specify field configuration conditions within the method:
Example:
if (fields.get(ExampleDTO_.id).getCurrentValue() != null) { fields.setEnabled(ExampleDTO_.example); } - Enabling field editing - the field becomes editable (editing is available in the form and in the list by double-clicking on the field)
-
buildIndependentMeta
-
buildRowDependentMeta
public abstract void buildRowDependentMeta(RowDependentFieldsMeta<T> fields, InnerBcDescription bcDescription, Long id, Long parentId) -
buildExtremeRowDependentMeta
public void buildExtremeRowDependentMeta(RowDependentFieldsMeta<T> fields, ExtremeBcDescription bcDescription, Long id, Long parentId) -
getActionType
-
getBc
-
getParentField
public <P extends org.cxbox.api.data.dto.DataResponseDTO,F> F getParentField(DtoField<P, F> dtoField, BusinessComponent bc) -
buildIndependentMeta
public abstract void buildIndependentMeta(FieldsMeta<T> fields, InnerBcDescription bcDescription, Long parentId) The method configures list/form fields with UI changes:
Filterable- adding column sorting, available only for lists (icon appear)FieldsCommonMeta.enableFilter(DtoField[])Sortable- adding column filtering, available only for lists (icon appear)FieldsCommonMeta.enableSort(DtoField[])- Filtering by enum values - adding filtering of columns with enum values(multiselect dropdown appear)
FieldsDictionaryMeta.setEnumFilterValues(FieldsMeta, DtoField, Enum[])- Filtering by custom values - adding filtering of columns with custom values(multiselect dropdown appear)
RowDependentFieldsDictionaryDeprecatedMeta.setDictionaryTypeWithCustomValues(DtoField, String...)- Specify acceptable formats when uploading files (when adding files, only files of the selected format will be available for addition)
FieldsCommonMeta.setFileAccept(DtoField, List)- Filtering by values obtained from the field - adding filtering of columns with values obtained from the field(multiselect dropdown appear)
FieldsCommonMeta.setConcreteFilterValues(DtoField, Collection)- e.t.c
-