Class EasyFormsDesignerServices
java.lang.Object
io.vertigo.easyforms.designer.services.EasyFormsDesignerServices
- All Implemented Interfaces:
io.vertigo.core.node.component.Component,io.vertigo.core.node.component.CoreComponent
public class EasyFormsDesignerServices
extends Object
implements io.vertigo.core.node.component.Component
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildContextDescription(EasyFormsTemplate easyFormsTemplate) Build a context description for the EasyFormsTemplate.buildContextDescription(EasyFormsTemplate easyFormsTemplate, Map<String, Serializable> additionalContext) Build a context description for the EasyFormsTemplate with additional context.voidcheckUpdateField(EasyFormsTemplate easyFormsTemplate, List<AbstractEasyFormsTemplateItem> items, Integer editIndex, Optional<Integer> editIndex2, EasyFormsItemUi fieldEdit, io.vertigo.datamodel.data.model.DtList<EasyFormsLabelUi> labels, Map<String, Serializable> additionalContext, io.vertigo.vega.webservice.validation.UiMessageStack uiMessageStack) Check and update a field of the EasyFormsTemplate.voidcheckUpdateSection(EasyFormsTemplate easyFormsTemplate, Integer editIndex, EasyFormsSectionUi sectionEdit, io.vertigo.datamodel.data.model.DtList<EasyFormsLabelUi> labels, Map<String, Serializable> additionalContext, io.vertigo.vega.webservice.validation.UiMessageStack uiMessageStack) Check and update a section of the EasyFormsTemplate.createEasyForm(EasyForm easyForm) Create a new EasyForm.io.vertigo.datamodel.data.model.DtList<EasyFormsFieldTypeUi> Get the list of all field types.io.vertigo.datamodel.data.model.DtList<EasyFormsFieldValidatorTypeUi> Get the list of all field validator types.Save an EasyForm.
-
Field Details
-
FORM_INTERNAL_CTX_NAME
- See Also:
-
-
Constructor Details
-
EasyFormsDesignerServices
public EasyFormsDesignerServices()
-
-
Method Details
-
getFieldTypeUiList
public io.vertigo.datamodel.data.model.DtList<EasyFormsFieldTypeUi> getFieldTypeUiList(Predicate<EasyFormsFieldTypeDefinition> filter) Get the list of all field types.- Parameters:
filter- Filter returned field types.- Returns:
- A list of all field types.
-
getFieldValidatorTypeUiList
public io.vertigo.datamodel.data.model.DtList<EasyFormsFieldValidatorTypeUi> getFieldValidatorTypeUiList()Get the list of all field validator types.- Returns:
- A list of all field validator types.
-
checkUpdateSection
public void checkUpdateSection(EasyFormsTemplate easyFormsTemplate, Integer editIndex, EasyFormsSectionUi sectionEdit, io.vertigo.datamodel.data.model.DtList<EasyFormsLabelUi> labels, Map<String, Serializable> additionalContext, io.vertigo.vega.webservice.validation.UiMessageStack uiMessageStack) Check and update a section of the EasyFormsTemplate.- Parameters:
easyFormsTemplate- The EasyFormsTemplate to update.editIndex- The index of the section to update.sectionEdit- The new section data.labels- The labels for the section.additionalContext- Additional context for the update.uiMessageStack- The UI message stack for the update.
-
buildContextDescription
Build a context description for the EasyFormsTemplate.- Parameters:
easyFormsTemplate- The EasyFormsTemplate to build the context for.- Returns:
- The context description.
-
buildContextDescription
public FormContextDescription buildContextDescription(EasyFormsTemplate easyFormsTemplate, Map<String, Serializable> additionalContext) Build a context description for the EasyFormsTemplate with additional context.- Parameters:
easyFormsTemplate- The EasyFormsTemplate to build the context for.additionalContext- Additional context for the description that will appear in 'ctx' section.- Returns:
- The context description.
-
checkUpdateField
public void checkUpdateField(EasyFormsTemplate easyFormsTemplate, List<AbstractEasyFormsTemplateItem> items, Integer editIndex, Optional<Integer> editIndex2, EasyFormsItemUi fieldEdit, io.vertigo.datamodel.data.model.DtList<EasyFormsLabelUi> labels, Map<String, Serializable> additionalContext, io.vertigo.vega.webservice.validation.UiMessageStack uiMessageStack) Check and update a field of the EasyFormsTemplate.- Parameters:
easyFormsTemplate- The EasyFormsTemplate to update.items- The items in the EasyFormsTemplate.editIndex- The index of the field to update.editIndex2- The secondary index of the field to update.fieldEdit- The new field data.labels- The labels for the field.additionalContext- Additional context for the update.uiMessageStack- The UI message stack for the update.
-
saveForm
Save an EasyForm.- Parameters:
easyForm- The EasyForm to save.- Returns:
- The saved EasyForm.
-
createEasyForm
Create a new EasyForm.- Parameters:
easyForm- The EasyForm to create.- Returns:
- The created EasyForm.
-