Class FormBuilderServiceImpl
- All Implemented Interfaces:
FormBuilderService
- Author:
- Andre Azzolini (apazzolini)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdminEntityServiceprotected AdminNavigationServiceprotected SecurityVerifierstatic final Stringprotected EntityDuplicatorprotected DynamicEntityDaoprotected EntityConfigurationprotected ExploitProtectionServiceprotected FormBuilderExtensionManagerprotected static final VisibilityEnum[]static final VisibilityEnum[]protected booleanprotected ListGridErrorMessageExtensionManagerprotected LocaleServiceprotected MediaBuilderServiceprotected AdminNavigationServiceprotected RowLevelSecurityServiceprotected TranslationServiceprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis method is invoked when EntityForms are created and is meant to provide a hook to add additional entity form actions for implementors of Broadleaf.protected voidaddDeleteActionIfAllowed(EntityForm entityForm, ClassMetadata cmd, Entity entity) Adds theDefaultEntityFormActions.DELETEif the user is allowed to delete the entity.protected voidaddDuplicateActionIfAllowed(EntityForm entityForm, ClassMetadata cmd) buildAdornedListForm(AdornedTargetCollectionMetadata adornedMd, AdornedTargetList adornedList, String parentId, boolean isViewCollectionItem, List<SectionCrumb> sectionCrumbs, boolean isAdd) Builds the EntityForm used in modal dialogs when adding items to adorned target collections.buildAdornedListForm(AdornedTargetCollectionMetadata adornedMd, AdornedTargetList adornedList, String parentId, boolean isViewCollectionItem, EntityForm ef, List<SectionCrumb> sectionCrumbs, boolean isAdd) Equivalent to#buildAdornedListForm(AdornedTargetCollectionMetadata, AdornedTargetList, String)except rather than creating a newEntityFormthis simply uses theEntityFormthat was passed in as ef.buildCollectionListGrid(String containingEntityId, DynamicResultSet drs, Property field, String sectionKey, List<SectionCrumb> sectionCrumbs) Builds a list grid that is used to render a collection inline in an entity form.buildMainListGrid(DynamicResultSet drs, ClassMetadata cmd, String sectionKey, List<SectionCrumb> sectionCrumbs) Builds a list grid that is typically used at the top entity level to select an entity for modification.buildMapForm(MapMetadata mapMd, MapStructure mapStructure, ClassMetadata cmd, String parentId) Builds the EntityForm used in modal dialogs when adding items to map collections.buildMapForm(MapMetadata mapMd, MapStructure mapStructure, ClassMetadata cmd, String parentId, EntityForm ef) Equivalent toFormBuilderService.buildMapForm(MapMetadata, MapStructure, ClassMetadata, String)except rather than creating a newEntityFormthis simply uses theEntityFormthat was passed in as ef.protected StringbuildMsgForDefValException(String type, BasicFieldMetadata fmd, String defaultValue) buildSelectizeCollectionInfo(String containingEntityId, DynamicResultSet drs, Property field, String sectionKey, List<SectionCrumb> sectionCrumbs) protected StringbuildSelectizeUrl(ListGrid listGrid) protected FieldDTOconstructFieldDTOFromFieldData(Field field, BasicFieldMetadata fmd) constructs the selectize option map based on the dynamic result set and class metadataprotected DataWrapperWhen using Thymeleaf, we need to convert the JSON string back to a DataWrapper object because Thymeleaf escapes JSON strings.createEntityForm(ClassMetadata cmd, List<SectionCrumb> sectionCrumbs) Creates a new EntityForm with the a default 'Save' action.createEntityForm(ClassMetadata cmd, Entity entity, List<SectionCrumb> sectionCrumbs) Creates a new EntityForm that has all of the appropriate fields set up along with the values for those fields from the given Entity.createEntityForm(ClassMetadata cmd, Entity entity, Map<String, DynamicResultSet> collectionRecords, List<SectionCrumb> sectionCrumbs) Builds an EntityForm that has all of the appropriate fields set up along with the values for those fields from the given Entity as well as all sub-collections of the given Entity that appear in the collectionRecords map.protected Fieldprotected ListGridcreateListGrid(String className, List<Field> headerFields, ListGrid.Type type, DynamicResultSet drs, String sectionKey, int order, String idProperty, List<SectionCrumb> sectionCrumbs) Deprecated.protected ListGridcreateListGrid(String className, List<Field> headerFields, ListGrid.Type type, DynamicResultSet drs, String sectionKey, Integer order, String idProperty, List<SectionCrumb> sectionCrumbs, String sortPropery) Populate a ListGrid with ListGridRecords.protected EntityFormprotected EntityFormprotected StringdecodeValueIfNeeded(BasicFieldMetadata basicFM, String value) extractDefaultValueFromFieldData(String fieldType, BasicFieldMetadata fmd) Extracts the DefaultValue from the FieldMetaData and parses it based on theSupportedFieldTypethat the field uses.protected StringextractSectionIdentifierFromCrumb(List<SectionCrumb> sectionCrumbs) protected voidfilterMapFormProperties(List<Property> mapFormProperties, List<String> classNames) protected booleanfoundMatchingTab(String unprocessedTabName) protected StringgetAdminSectionPath(String foreignKeyClass) This method gets theAdminSectionfor the given foreignKeyClass parameter.protected Stringprotected VisibilityEnum[]protected Stringprotected VisibilityEnum[]protected StringgetMapKeyFriendlyName(Property property) protected StringgetSecurityClassname(EntityForm entityForm, ClassMetadata cmd) Obtains the class name suitable for passing along to theSecurityVerifierprotected voidgetTranslationSearchField(String ceilingEntity, ArrayList<FieldDTO> defaultWrapperFields) protected StringgetUnprocessedNameOfMatchingTab(TabMetadata tabMetadata, Set<String> tabMetadataKeySet) Search for any other tab on the target entity that has the same display value as the value provided tab name.getValueClassNames(String valueClassName) protected Fieldprotected booleanprotected booleanisDeletionAllowed(EntityForm entityForm, ClassMetadata cmd, Entity entity) protected BooleanisDerivedField(Field headerField, Field recordField, Property p) Determines whether or not a particular field in a record is derived.protected booleanisDuplicationAllowed(EntityForm entityForm, ClassMetadata cmd) protected booleanisSupportedFieldTypes(BasicFieldMetadata fmd, SupportedFieldType... supportedFieldType) voidpopulateAdornedEntityFormFields(EntityForm ef, Entity entity, AdornedTargetList adornedList) Sets values for the necessary adorned fields on the EntityForm from the specified entity.protected voidvoidpopulateEntityForm(ClassMetadata cmd, Entity entity, Map<String, DynamicResultSet> collectionRecords, EntityForm ef, List<SectionCrumb> sectionCrumbs) Builds an EntityForm that has all of the appropriate fields set up along with the values for thsoe fields from the given Entity as well as all sub-collections of the given Entity that appear in the collectionRecords map.voidpopulateEntityForm(ClassMetadata cmd, Entity entity, EntityForm ef, List<SectionCrumb> sectionCrumbs) Populates a given ef based on the given cmd to initially create fields with the necessary metadata and then fills those fields out based on the property values from entity.voidpopulateEntityForm(ClassMetadata cmd, EntityForm ef, List<SectionCrumb> sectionCrumbs) Populates the given ef with all of the fields based on the properties from cmd.voidpopulateEntityFormFields(EntityForm ef, Entity entity) Delegates toFormBuilderService.populateEntityFormFields(EntityForm, Entity, boolean, boolean)with true for populating both the id and type.voidpopulateEntityFormFields(EntityForm ef, Entity entity, boolean populateType, boolean populateId) Sets values for all fields found on the EntityForm from the specified entity.voidpopulateEntityFormFieldValues(ClassMetadata cmd, Entity entity, EntityForm ef) Populates the givenEntityFormwith values based on theEntitythat has been passed in.voidpopulateMapEntityFormFields(EntityForm ef, Entity entity) Sets values for the necessary map fields on the EntityForm from the specified entity.protected booleanprocessedTabKeyMatchesTabName(String tabName, String candidateTabKey) protected booleanpropertyExistsInResultSet(Property property, DynamicResultSet drs) voidremoveNonApplicableFields(ClassMetadata cmd, EntityForm entityForm, String entityType) Loops through all of the fields that are specified in given class metadata and removes fields that are not applicable for the given polymorphic entity type from the entity form.protected voidsetDateToRecordField(Field recordField, Property property, SimpleDateFormat formatter) protected voidsetEntityFormFields(ClassMetadata cmd, EntityForm ef, List<Property> properties) protected voidsetEntityFormTabsAndGroups(EntityForm ef, Map<String, TabMetadata> tabMetadataMap) NOTE: This method will attempt to merge tabs if the unprocessedTabMetadata.getTabName()is equal to the processed value of another tab.protected voidsetReadOnlyState(EntityForm entityForm, ClassMetadata cmd, Entity entity) The given entityForm is marked as readonly for the following cases: All of the properties from cmd are readonly The user does not have the security toEntityOperationType.UPDATEthe given class name represented by the entityForm (determined bygetSecurityClassname(EntityForm, ClassMetadata)) The user does not have the security necessary to modify the given entity according to theRowLevelSecurityProvider.canUpdate(AdminUser, Entity)protected voidsetVisibilityBasedOnShowIfFieldEquals(ClassMetadata cmd, Entity entity, EntityForm ef) protected booleanshouldHideField(FieldMetadata fmd, Entity entity) protected booleantabExists(EntityForm ef, String tabKey)
-
Field Details
-
ALTERNATE_ID_PROPERTY
- See Also:
-
GRID_HIDDEN_VISIBILITIES
-
FORM_HIDDEN_VISIBILITIES
-
adminEntityService
-
extensionManager
-
entityConfiguration
-
adminRemoteSecurityService
-
rowLevelSecurityService
-
mediaBuilderService
-
listGridErrorExtensionManager
-
duplicator
-
dynamicEntityDao
-
localeService
-
translationService
-
useTranslationSearch
@Value("${use.translation.search:false}") protected boolean useTranslationSearch -
htmlEscapeMainEntityLink
@Value("${escape.html.main.link:false}") protected boolean htmlEscapeMainEntityLink -
exploitProtectionService
-
-
Constructor Details
-
FormBuilderServiceImpl
public FormBuilderServiceImpl()
-
-
Method Details
-
buildMainListGrid
public ListGrid buildMainListGrid(DynamicResultSet drs, ClassMetadata cmd, String sectionKey, List<SectionCrumb> sectionCrumbs) throws ServiceException Description copied from interface:FormBuilderServiceBuilds a list grid that is typically used at the top entity level to select an entity for modification.Note that it can also be used in other places that require the same grid as the main entity search screen provided the type on the returned ListGrid is set appropriately.
- Specified by:
buildMainListGridin interfaceFormBuilderService- Returns:
- the ListGrid
- Throws:
ServiceException
-
getTranslationSearchField
-
constructFieldDTOFromFieldData
-
createHeaderField
-
initHeaderField
-
isComboField
-
isSupportedFieldTypes
protected boolean isSupportedFieldTypes(BasicFieldMetadata fmd, SupportedFieldType... supportedFieldType) -
buildCollectionListGrid
public ListGrid buildCollectionListGrid(String containingEntityId, DynamicResultSet drs, Property field, String sectionKey, List<SectionCrumb> sectionCrumbs) throws ServiceException Description copied from interface:FormBuilderServiceBuilds a list grid that is used to render a collection inline in an entity form.Note that it can also be used in other places that require the same grid provided the type on the returned ListGrid is set appropriately.
- Specified by:
buildCollectionListGridin interfaceFormBuilderService- Returns:
- the ListGrid
- Throws:
ServiceException
-
propertyExistsInResultSet
-
getMapKeyFriendlyName
-
buildSelectizeCollectionInfo
public Map<String,Object> buildSelectizeCollectionInfo(String containingEntityId, DynamicResultSet drs, Property field, String sectionKey, List<SectionCrumb> sectionCrumbs) throws ServiceException - Specified by:
buildSelectizeCollectionInfoin interfaceFormBuilderService- Returns:
- the ListGrid
- Throws:
ServiceException
-
constructSelectizeOptionMap
Description copied from interface:FormBuilderServiceconstructs the selectize option map based on the dynamic result set and class metadata- Specified by:
constructSelectizeOptionMapin interfaceFormBuilderService- Returns:
-
buildSelectizeUrl
-
createListGrid
@Deprecated protected ListGrid createListGrid(String className, List<Field> headerFields, ListGrid.Type type, DynamicResultSet drs, String sectionKey, int order, String idProperty, List<SectionCrumb> sectionCrumbs) Deprecated.- Parameters:
className-headerFields-type-drs-sectionKey-order-idProperty-sectionCrumbs-- Returns:
-
createListGrid
protected ListGrid createListGrid(String className, List<Field> headerFields, ListGrid.Type type, DynamicResultSet drs, String sectionKey, Integer order, String idProperty, List<SectionCrumb> sectionCrumbs, String sortPropery) Populate a ListGrid with ListGridRecords.- Parameters:
className-headerFields-type-drs-sectionKey-order-idProperty-sectionCrumbs-sortPropery-- Returns:
-
isDerivedField
Determines whether or not a particular field in a record is derived. By default this checks theBasicFieldMetadatafor the given Property to see if something on the backend has marked it as derived- Parameters:
headerField- the header for this recordFieldrecordField- the recordField being populatedp- the property that relates to this recordField- Returns:
- whether or not this field is derived
-
setEntityFormFields
-
setDateToRecordField
protected void setDateToRecordField(Field recordField, Property property, SimpleDateFormat formatter) -
getFieldComponentRenderer
-
getGridFieldComponentRenderer
-
getAdminSectionPath
This method gets theAdminSectionfor the given foreignKeyClass parameter. If none exists, it returns the foreignKeyClass.- Parameters:
foreignKeyClass- theStringclass name- Returns:
- the admin section pathname
-
setEntityFormTabsAndGroups
NOTE: This method will attempt to merge tabs if the unprocessedTabMetadata.getTabName()is equal to the processed value of another tab.For example, if
TabMetadata.getTabName()is "Example", there is a another tab whereTabMetadata.getTabName()is "Example_Tab", and a message property where 'Example_Tab=Example', then the tabs should be merged together, so that we do not end up rendering multiple "Example" tabs. -
getUnprocessedNameOfMatchingTab
protected String getUnprocessedNameOfMatchingTab(TabMetadata tabMetadata, Set<String> tabMetadataKeySet) Search for any other tab on the target entity that has the same display value as the value provided tab name.This assumes that the
TabMetadata.getTabName()is in the form of a processed message property. For example, ifTabMetadata.getTabName()is "Example", there is a tabKey from the tabMetadataKeySet that is "Example_Tab", and a message property where 'Example_Tab=Example', then this method should return "Example_Tab" which will end up causing the tabs to merge together.If a tab with the same display value cannot be found, then we should return null to indicate that there is no matching tab with the same processed tabName value.
-
processedTabKeyMatchesTabName
-
foundMatchingTab
-
tabExists
-
extractDefaultValueFromFieldData
Description copied from interface:FormBuilderServiceExtracts the DefaultValue from the FieldMetaData and parses it based on theSupportedFieldTypethat the field uses.Logs a warning in the event of failure to parse the value and returns null.
- Specified by:
extractDefaultValueFromFieldDatain interfaceFormBuilderService- Returns:
- The value to be used on the form field.
-
buildMsgForDefValException
protected String buildMsgForDefValException(String type, BasicFieldMetadata fmd, String defaultValue) -
removeNonApplicableFields
Description copied from interface:FormBuilderServiceLoops through all of the fields that are specified in given class metadata and removes fields that are not applicable for the given polymorphic entity type from the entity form.- Specified by:
removeNonApplicableFieldsin interfaceFormBuilderService
-
createEntityForm
public EntityForm createEntityForm(ClassMetadata cmd, List<SectionCrumb> sectionCrumbs) throws ServiceException Description copied from interface:FormBuilderServiceCreates a new EntityForm with the a default 'Save' action. This will then delegate to#populateEntityForm(ClassMetadata, EntityForm)to ensure that the newly createdEntityFormhas all of the appropriate fields set up without any values based on cmd- Specified by:
createEntityFormin interfaceFormBuilderService- Returns:
- the EntityForm
- Throws:
ServiceException
-
extractSectionIdentifierFromCrumb
-
populateEntityForm
public void populateEntityForm(ClassMetadata cmd, EntityForm ef, List<SectionCrumb> sectionCrumbs) throws ServiceException Description copied from interface:FormBuilderServicePopulates the given ef with all of the fields based on the properties from cmd. For all the fields that are created, no values are set (as cmd usually does not have any). In order to fill out values in the given ef, consider instead calling#populateEntityForm(ClassMetadata, Entity, EntityForm, boolean)- Specified by:
populateEntityFormin interfaceFormBuilderService- Throws:
ServiceException
-
addAdditionalFormActions
This method is invoked when EntityForms are created and is meant to provide a hook to add additional entity form actions for implementors of Broadleaf. Broadleaf modules will typically leverageFormBuilderExtensionHandler.addAdditionalFormActions(EntityForm)method.- Parameters:
ef-
-
createEntityForm
public EntityForm createEntityForm(ClassMetadata cmd, Entity entity, List<SectionCrumb> sectionCrumbs) throws ServiceException Description copied from interface:FormBuilderServiceCreates a new EntityForm that has all of the appropriate fields set up along with the values for those fields from the given Entity. Delegates to#createEntityForm(ClassMetadata)for further population- Specified by:
createEntityFormin interfaceFormBuilderService- Parameters:
cmd- metadata that the createdEntityFormshould use to initialize its fields- Returns:
- the EntityForm
- Throws:
ServiceException
-
populateEntityForm
public void populateEntityForm(ClassMetadata cmd, Entity entity, EntityForm ef, List<SectionCrumb> sectionCrumbs) throws ServiceException Description copied from interface:FormBuilderServicePopulates a given ef based on the given cmd to initially create fields with the necessary metadata and then fills those fields out based on the property values from entity.- Specified by:
populateEntityFormin interfaceFormBuilderService- Throws:
ServiceException
-
setVisibilityBasedOnShowIfFieldEquals
protected void setVisibilityBasedOnShowIfFieldEquals(ClassMetadata cmd, Entity entity, EntityForm ef) -
shouldHideField
-
populateEntityFormFieldValues
Description copied from interface:FormBuilderServicePopulates the givenEntityFormwith values based on theEntitythat has been passed in. TheClassMetadatais used to determine which properties should be attempted to be populated- Specified by:
populateEntityFormFieldValuesin interfaceFormBuilderService- Parameters:
cmd- 'inspect' metadata for the class being populatedentity- theEntitythat should be used to fill out the field values in the givenEntityFormef- theEntityFormto populate field values from the givenEntity
-
decodeValueIfNeeded
-
convertJsonToDataWrapper
When using Thymeleaf, we need to convert the JSON string back to a DataWrapper object because Thymeleaf escapes JSON strings. Thymeleaf uses it's own object de-serializer see: https://github.com/thymeleaf/thymeleaf/issues/84 see: http://forum.thymeleaf.org/Spring-Javascript-and-escaped-JSON-td4024739.html- Parameters:
json-- Returns:
- DataWrapper
- Throws:
IOException
-
populateDropdownToOneFields
protected void populateDropdownToOneFields(EntityForm ef, ClassMetadata cmd) throws ServiceException - Throws:
ServiceException
-
createEntityForm
public EntityForm createEntityForm(ClassMetadata cmd, Entity entity, Map<String, DynamicResultSet> collectionRecords, List<SectionCrumb> sectionCrumbs) throws ServiceExceptionDescription copied from interface:FormBuilderServiceBuilds an EntityForm that has all of the appropriate fields set up along with the values for those fields from the given Entity as well as all sub-collections of the given Entity that appear in the collectionRecords map. This method simply delegates to create a standardEntityForm(that has a save action) and then populates thatEntityFormusing#populateEntityForm(ClassMetadata, Entity, Map, EntityForm).NOTE: if you are submitting a validation result, you must not call this method and instead invoke the one that has an
EntityFormas a parameter. You cannot re-assign the entityForm to the model after it has already been bound to a BindingResult, else the binding result will be removed.- Specified by:
createEntityFormin interfaceFormBuilderService- Returns:
- the EntityForm
- Throws:
ServiceException
-
populateEntityForm
public void populateEntityForm(ClassMetadata cmd, Entity entity, Map<String, DynamicResultSet> collectionRecords, EntityForm ef, List<SectionCrumb> sectionCrumbs) throws ServiceExceptionDescription copied from interface:FormBuilderServiceBuilds an EntityForm that has all of the appropriate fields set up along with the values for thsoe fields from the given Entity as well as all sub-collections of the given Entity that appear in the collectionRecords map.NOTE: This method is mainly used when coming back from validation. In the case of validation, you cannot re-add a new
EntityFormto the model or else you lose the wholeBindingResultand errors will not properly be displayed. In that scenario, you must use this method rather than the one that does not take in an entityForm as it will attempt to instantiate a new object.- Specified by:
populateEntityFormin interfaceFormBuilderServiceef- rather than instantiate a new EntityForm, this will use this parameter to fill out- Throws:
ServiceException
-
addDeleteActionIfAllowed
Adds theDefaultEntityFormActions.DELETEif the user is allowed to delete the entity. The user can delete an entity for the following cases:- The user has the security to
EntityOperationType.REMOVEthe given class name represented by the entityForm (determined bygetSecurityClassname(EntityForm, ClassMetadata)) - The user has the security necessary to delete the given entity according to the
RowLevelSecurityProvider.canRemove(AdminUser, Entity)
- Parameters:
entityForm- the form being generatedcmd- the metatadata used to build the entityForm for the entityentity- the entity being edited
- The user has the security to
-
isDeletionAllowed
-
addDuplicateActionIfAllowed
-
isDuplicationAllowed
-
setReadOnlyState
The given entityForm is marked as readonly for the following cases:- All of the properties from cmd are readonly
- The user does not have the security to
EntityOperationType.UPDATEthe given class name represented by the entityForm (determined bygetSecurityClassname(EntityForm, ClassMetadata)) - The user does not have the security necessary to modify the given entity according to the
RowLevelSecurityProvider.canUpdate(AdminUser, Entity)
- Parameters:
entityForm- the form being generatedcmd- the metatadata used to build the entityForm for the entityentity- the entity being edited
-
getSecurityClassname
Obtains the class name suitable for passing along to theSecurityVerifier- Parameters:
entityForm-cmd-- Returns:
-
populateEntityFormFields
Description copied from interface:FormBuilderServiceDelegates toFormBuilderService.populateEntityFormFields(EntityForm, Entity, boolean, boolean)with true for populating both the id and type.- Specified by:
populateEntityFormFieldsin interfaceFormBuilderService
-
populateEntityFormFields
public void populateEntityFormFields(EntityForm ef, Entity entity, boolean populateType, boolean populateId) Description copied from interface:FormBuilderServiceSets values for all fields found on the EntityForm from the specified entity.- Specified by:
populateEntityFormFieldsin interfaceFormBuilderServicepopulateType- whether or not to use the type from the givenEntityor keep the current value on theEntityFormpopulateId- whether or not to use the id from the givenEntityor keep the current value on theEntityForm
-
populateAdornedEntityFormFields
public void populateAdornedEntityFormFields(EntityForm ef, Entity entity, AdornedTargetList adornedList) Description copied from interface:FormBuilderServiceSets values for the necessary adorned fields on the EntityForm from the specified entity.- Specified by:
populateAdornedEntityFormFieldsin interfaceFormBuilderService
-
populateMapEntityFormFields
Description copied from interface:FormBuilderServiceSets values for the necessary map fields on the EntityForm from the specified entity.- Specified by:
populateMapEntityFormFieldsin interfaceFormBuilderService
-
buildAdornedListForm
public EntityForm buildAdornedListForm(AdornedTargetCollectionMetadata adornedMd, AdornedTargetList adornedList, String parentId, boolean isViewCollectionItem, List<SectionCrumb> sectionCrumbs, boolean isAdd) throws ServiceException Description copied from interface:FormBuilderServiceBuilds the EntityForm used in modal dialogs when adding items to adorned target collections.- Specified by:
buildAdornedListFormin interfaceFormBuilderService- Returns:
- the EntityForm
- Throws:
ServiceException
-
buildAdornedListForm
public EntityForm buildAdornedListForm(AdornedTargetCollectionMetadata adornedMd, AdornedTargetList adornedList, String parentId, boolean isViewCollectionItem, EntityForm ef, List<SectionCrumb> sectionCrumbs, boolean isAdd) throws ServiceException Description copied from interface:FormBuilderServiceEquivalent to#buildAdornedListForm(AdornedTargetCollectionMetadata, AdornedTargetList, String)except rather than creating a newEntityFormthis simply uses theEntityFormthat was passed in as ef. Used mainly when rebuilding anEntityFormafter it has already been bound by Spring.Before invoking this method, you should invoke
EntityForm.clearFieldsMap()to ensure that you have a clean set of field groups and tabs for this method to work with- Specified by:
buildAdornedListFormin interfaceFormBuilderServiceef- the form DTO to populate- Returns:
- the original
EntityFormpassed in but fully populated - Throws:
ServiceException
-
buildMapForm
public EntityForm buildMapForm(MapMetadata mapMd, MapStructure mapStructure, ClassMetadata cmd, String parentId) throws ServiceException Description copied from interface:FormBuilderServiceBuilds the EntityForm used in modal dialogs when adding items to map collections.- Specified by:
buildMapFormin interfaceFormBuilderService- Returns:
- the EntityForm
- Throws:
ServiceException
-
buildMapForm
public EntityForm buildMapForm(MapMetadata mapMd, MapStructure mapStructure, ClassMetadata cmd, String parentId, EntityForm ef) throws ServiceException Description copied from interface:FormBuilderServiceEquivalent toFormBuilderService.buildMapForm(MapMetadata, MapStructure, ClassMetadata, String)except rather than creating a newEntityFormthis simply uses theEntityFormthat was passed in as ef. Used mainly when rebuilding anEntityFormafter it has already been bound by Spring.Before invoking this method, you should invoke
EntityForm.clearFieldsMap()to ensure that you have a clean set of field groups and tabs for this method to work with- Specified by:
buildMapFormin interfaceFormBuilderServiceef- the form DTO to populate- Returns:
- the original
EntityFormpassed in but fully populated - Throws:
ServiceException
-
getValueClassNames
-
filterMapFormProperties
-
createStandardEntityForm
-
createStandardAdornedEntityForm
-
getGridHiddenVisibilities
-
getFormHiddenVisibilities
-
createListGrid(String, List, ListGrid.Type, DynamicResultSet, String, Integer, String, List, String)