Both sides previous revision
Previous revision
Next revision
|
Previous revision
Last revision
Both sides next revision
|
devel:documentation:application_configuration:dev:dynamic-forms [2019/09/25 07:27] tomiskar |
devel:documentation:application_configuration:dev:dynamic-forms [2020/08/05 08:59] tomiskar |
| |
<note> | <note> |
**''FormService'' service for working with the extended attributes on the back-end.** **''FormInstance''** utility is useful on BE - contains value transformation to maps by attributes etc.. | **''FormService'' service for working with the extended attributes on the back-end.** **''FormInstance''** utility is useful on BE - contains value transformation to maps by attributes etc.. Use this service in your custom module, benefits: |
| * single autowired service for work with definitions, attributes and values |
| * cache ''core:form-definition-cache'' for loading form definitions (with attributes) is effective here. |
</note> | </note> |
<note> | <note> |
| |
<note important>Saving form values for the form definition work as **PATCH**. When attribute value has to be deleted, then form value with **null** has to be given (use it even for multi valued attributes).</note> | <note important>Saving form values for the form definition work as **PATCH**. When attribute value has to be deleted, then form value with **null** has to be given (use it even for multi valued attributes).</note> |
| |
| <note>If single attribute is saved (''FormService#saveAttribute''), then event ''EAV\_SAVE'' is not published. Save all attributes (''FormService#saveValues''), if publishing event ''EAV_SAVE'' for owner is needed.</note> |
| |
Dynamic form attribute supports data types (''persistentType''): | Dynamic form attribute supports data types (''persistentType''): |
<note info>Min and max validation is supported for numeric ''DOUBLE'', ''INT'', ''LONG'' persistent types.</note> | <note info>Min and max validation is supported for numeric ''DOUBLE'', ''INT'', ''LONG'' persistent types.</note> |
| |
==== Regex ==== | === Regex === |
| |
Value has to match given regular expression ([[https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html|java pattern]] is used). | Value has to match given regular expression ([[https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html|java pattern]] is used). |
{{ :devel:documentation:application_configuration:dev:validation.png |}} | {{ :devel:documentation:application_configuration:dev:validation.png |}} |
| |
==== Validation message ==== | === Validation message === |
| |
Custom validation message. If message is not defined, then default message by invalid validation type will be shown. | Custom validation message. If message is not defined, then default message by invalid validation type will be shown. |