Платформа 3V/Формы/Действия/Сохранение источников: различия между версиями
< Платформа 3V | Формы | Действия
Перейти к навигации
Перейти к поиску
(Новая страница: «Действие, которое сохраняет добавленный элемент в Платформа_3V/Формы/Источники_данных|''...») |
|||
Строка 6: | Строка 6: | ||
], | ], | ||
"id": 111, | "id": 111, | ||
− | "comment": "Сохранение | + | "comment": "Сохранение источника", |
"discriminator": "SaveDataSourceAction" | "discriminator": "SaveDataSourceAction" | ||
} | } | ||
Строка 27: | Строка 27: | ||
− | ==Пример использования( | + | ==Пример использования(сохранение в справочнике)== |
− | Кейс: | + | Кейс: Сохранить изменения в справочнике. |
− | Добавить действие, | + | Добавить действие, где указать [[Платформа_3V/Формы/Источники_данных|'''источник данных''']], в котором требуется сохранять изменения. Сохранение происходит при нажатии кнопки. |
− | [[Файл: | + | [[Файл:Сохранение справочника.gif|мини|слева]] |
− | <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> | + | <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> |
<div class="toccolours mw-collapsible mw-collapsed" style="width:800px; overflow:auto;"> | <div class="toccolours mw-collapsible mw-collapsed" style="width:800px; overflow:auto;"> | ||
<div style="font-weight:bold;line-height:1.6;">JSON серверной карточки</div> | <div style="font-weight:bold;line-height:1.6;">JSON серверной карточки</div> | ||
Строка 38: | Строка 38: | ||
<syntaxhighlight lang="JSON" line> | <syntaxhighlight lang="JSON" line> | ||
{ | { | ||
− | "id": | + | "id": 78, |
− | "name": " | + | "name": "SaveDataSourceAction", |
"description": "", | "description": "", | ||
"title": "", | "title": "", | ||
"entrySettings": null, | "entrySettings": null, | ||
− | "uiSources": [ | + | "uiSources": [ |
+ | { | ||
+ | "dataSourceId": 111, | ||
+ | "nameTemplate": "", | ||
+ | "displayAttribute": null, | ||
+ | "hasMultipleValue": false, | ||
+ | "hasNullableValue": false, | ||
+ | "maxElements": null, | ||
+ | "hasServerFiltration": false, | ||
+ | "searchSettings": { | ||
+ | "maxElements": null, | ||
+ | "minInputChars": 2, | ||
+ | "searchMode": "Client", | ||
+ | "debounceMs": 300 | ||
+ | }, | ||
+ | "id": 111, | ||
+ | "caption": null, | ||
+ | "enable": true, | ||
+ | "visible": true, | ||
+ | "hint": null, | ||
+ | "uiDataSource": null, | ||
+ | "doActionOnChangeValue": true, | ||
+ | "onAfterChangeValueConditionalActions": null, | ||
+ | "onAfterChangeValueByClientConditionalActions": null, | ||
+ | "rebuildDependentsObjectOnChange": true, | ||
+ | "enableRuleIds": [], | ||
+ | "visibleRuleIds": [], | ||
+ | "access": null, | ||
+ | "isValueChanged": true, | ||
+ | "expressionId": null, | ||
+ | "discriminator": "DictionarySourceEntry" | ||
+ | }, | ||
{ | { | ||
"submitRuleIds": [], | "submitRuleIds": [], | ||
Строка 52: | Строка 83: | ||
"controlsValueCalculateRulesIds": [], | "controlsValueCalculateRulesIds": [], | ||
"conditionalActions": [ | "conditionalActions": [ | ||
− | + | 111 | |
], | ], | ||
"onBeforeClickConditionalActions": [], | "onBeforeClickConditionalActions": [], | ||
"id": 112, | "id": 112, | ||
− | "caption": " | + | "caption": "Сохранить", |
"enable": true, | "enable": true, | ||
"visible": true, | "visible": true, | ||
Строка 102: | Строка 133: | ||
"expressionId": null, | "expressionId": null, | ||
"discriminator": "PivotSourceEntry" | "discriminator": "PivotSourceEntry" | ||
+ | }, | ||
+ | { | ||
+ | "defaultValue": null, | ||
+ | "value": null, | ||
+ | "id": 21, | ||
+ | "caption": "Номер договора", | ||
+ | "enable": true, | ||
+ | "visible": true, | ||
+ | "hint": null, | ||
+ | "uiDataSource": { | ||
+ | "attributeId": 21, | ||
+ | "sourceId": 111, | ||
+ | "discriminator": "UiDataSourceDictionary" | ||
+ | }, | ||
+ | "doActionOnChangeValue": false, | ||
+ | "discriminator": "StringSourceEntry" | ||
+ | }, | ||
+ | { | ||
+ | "defaultValue": null, | ||
+ | "value": null, | ||
+ | "id": 22, | ||
+ | "caption": "Дата заключения", | ||
+ | "enable": true, | ||
+ | "visible": true, | ||
+ | "hint": null, | ||
+ | "uiDataSource": { | ||
+ | "attributeId": 22, | ||
+ | "sourceId": 111, | ||
+ | "discriminator": "UiDataSourceDictionary" | ||
+ | }, | ||
+ | "doActionOnChangeValue": false, | ||
+ | "discriminator": "StringSourceEntry" | ||
} | } | ||
], | ], | ||
− | "entryDataSources": [ | + | "entryDataSources": [ |
{ | { | ||
− | "pivotId": | + | "dictionaryId": 80, |
+ | "hierarchyId": null, | ||
+ | "filter": null, | ||
+ | "sortingOptions": null, | ||
+ | "groupingOptions": null, | ||
+ | "dictionaryAttributes": null, | ||
+ | "defaultValue": [], | ||
+ | "defaultValueExpressionId": null, | ||
+ | "parameterId": null, | ||
+ | "dictionarySourceSelectionMode": "None", | ||
+ | "dataSourceAttributesAdditionsSettings": [], | ||
+ | "externalFileStorageUrl": null, | ||
+ | "filePrefix": null, | ||
+ | "defaultNewElementSettings": null, | ||
+ | "id": 111, | ||
+ | "name": null, | ||
+ | "isReadOnly": false, | ||
+ | "dataEditRuleIds": [], | ||
+ | "beforeSaveDataActions": [], | ||
+ | "afterSaveDataActions": [], | ||
+ | "discriminator": "DictionaryDataSource" | ||
+ | }, | ||
+ | { | ||
+ | "pivotId": 81, | ||
"parameters": [], | "parameters": [], | ||
"focusOnFirstCell": true, | "focusOnFirstCell": true, | ||
Строка 113: | Строка 199: | ||
"id": 222, | "id": 222, | ||
"name": null, | "name": null, | ||
− | "isReadOnly": | + | "isReadOnly": false, |
"dataEditRuleIds": [], | "dataEditRuleIds": [], | ||
"beforeSaveDataActions": [], | "beforeSaveDataActions": [], | ||
Строка 125: | Строка 211: | ||
"expressions": [], | "expressions": [], | ||
"controlsValueCalculateRules": [], | "controlsValueCalculateRules": [], | ||
− | "actions": [ | + | "actions": [ |
{ | { | ||
− | " | + | "dataSourcesIds": [ |
+ | 111 | ||
+ | ], | ||
+ | "id": 111, | ||
+ | "comment": "Сохранение значения", | ||
+ | "discriminator": "SaveDataSourceAction" | ||
+ | }, | ||
+ | { | ||
+ | "dataSourcesIds": [ | ||
+ | 222 | ||
+ | ], | ||
"id": 222, | "id": 222, | ||
− | "comment": " | + | "comment": "Сохранение значения", |
− | "discriminator": " | + | "discriminator": "SaveDataSourceAction" |
} | } | ||
], | ], | ||
"conditionActionIdsOnOpen": [], | "conditionActionIdsOnOpen": [], | ||
− | "conditionalActions": [ | + | "conditionalActions": [ |
+ | { | ||
+ | "id": 111, | ||
+ | "binaryConditionRuleId": null, | ||
+ | "actions": [ | ||
+ | 111 | ||
+ | ], | ||
+ | "parallelRunning": true | ||
+ | }, | ||
{ | { | ||
"id": 222, | "id": 222, | ||
Строка 141: | Строка 245: | ||
222 | 222 | ||
], | ], | ||
− | "parallelRunning": | + | "parallelRunning": true |
} | } | ||
], | ], |
Версия 13:22, 22 апреля 2021
Действие, которое сохраняет добавленный элемент в источнике данных, имеет следующую структуру:
1 {
2 "dataSourcesIds": [
3 111
4 ],
5 "id": 111,
6 "comment": "Сохранение источника",
7 "discriminator": "SaveDataSourceAction"
8 }
Описание свойств действия
Свойство | Описание |
---|---|
dataSourcesIds | Идентификаторы источников данных |
id | Идентификатор действия |
comment | Описание действия |
discriminator | SaveDataSourceAction |
Пример использования(сохранение в справочнике)
Кейс: Сохранить изменения в справочнике.
Добавить действие, где указать источник данных, в котором требуется сохранять изменения. Сохранение происходит при нажатии кнопки.
JSON серверной карточки
1 {
2 "id": 78,
3 "name": "SaveDataSourceAction",
4 "description": "",
5 "title": "",
6 "entrySettings": null,
7 "uiSources": [
8 {
9 "dataSourceId": 111,
10 "nameTemplate": "",
11 "displayAttribute": null,
12 "hasMultipleValue": false,
13 "hasNullableValue": false,
14 "maxElements": null,
15 "hasServerFiltration": false,
16 "searchSettings": {
17 "maxElements": null,
18 "minInputChars": 2,
19 "searchMode": "Client",
20 "debounceMs": 300
21 },
22 "id": 111,
23 "caption": null,
24 "enable": true,
25 "visible": true,
26 "hint": null,
27 "uiDataSource": null,
28 "doActionOnChangeValue": true,
29 "onAfterChangeValueConditionalActions": null,
30 "onAfterChangeValueByClientConditionalActions": null,
31 "rebuildDependentsObjectOnChange": true,
32 "enableRuleIds": [],
33 "visibleRuleIds": [],
34 "access": null,
35 "isValueChanged": true,
36 "expressionId": null,
37 "discriminator": "DictionarySourceEntry"
38 },
39 {
40 "submitRuleIds": [],
41 "actionConfirmation": {
42 "message": null,
43 "conditionId": null
44 },
45 "controlsValueCalculateRulesIds": [],
46 "conditionalActions": [
47 111
48 ],
49 "onBeforeClickConditionalActions": [],
50 "id": 112,
51 "caption": "Сохранить",
52 "enable": true,
53 "visible": true,
54 "hint": null,
55 "uiDataSource": null,
56 "doActionOnChangeValue": false,
57 "onAfterChangeValueConditionalActions": null,
58 "onAfterChangeValueByClientConditionalActions": null,
59 "enableRuleIds": [],
60 "visibleRuleIds": [],
61 "access": {
62 "read": {
63 "roles": [],
64 "inversion": false,
65 "default": true
66 },
67 "edit": {
68 "roles": [],
69 "inversion": false,
70 "default": true
71 }
72 },
73 "isValueChanged": false,
74 "expressionId": null,
75 "discriminator": "CustomButtonEntry"
76 },
77 {
78 "pivotSourceId": 222,
79 "doActionOnChangeFocusedCell": true,
80 "doActionOnChangeCellValue": false,
81 "id": 222,
82 "caption": null,
83 "enable": false,
84 "visible": true,
85 "hint": null,
86 "uiDataSource": null,
87 "doActionOnChangeValue": false,
88 "onAfterChangeValueConditionalActions": null,
89 "onAfterChangeValueByClientConditionalActions": null,
90 "rebuildDependentsObjectOnChange": true,
91 "enableRuleIds": [],
92 "visibleRuleIds": [],
93 "access": null,
94 "isValueChanged": false,
95 "expressionId": null,
96 "discriminator": "PivotSourceEntry"
97 },
98 {
99 "defaultValue": null,
100 "value": null,
101 "id": 21,
102 "caption": "Номер договора",
103 "enable": true,
104 "visible": true,
105 "hint": null,
106 "uiDataSource": {
107 "attributeId": 21,
108 "sourceId": 111,
109 "discriminator": "UiDataSourceDictionary"
110 },
111 "doActionOnChangeValue": false,
112 "discriminator": "StringSourceEntry"
113 },
114 {
115 "defaultValue": null,
116 "value": null,
117 "id": 22,
118 "caption": "Дата заключения",
119 "enable": true,
120 "visible": true,
121 "hint": null,
122 "uiDataSource": {
123 "attributeId": 22,
124 "sourceId": 111,
125 "discriminator": "UiDataSourceDictionary"
126 },
127 "doActionOnChangeValue": false,
128 "discriminator": "StringSourceEntry"
129 }
130 ],
131 "entryDataSources": [
132 {
133 "dictionaryId": 80,
134 "hierarchyId": null,
135 "filter": null,
136 "sortingOptions": null,
137 "groupingOptions": null,
138 "dictionaryAttributes": null,
139 "defaultValue": [],
140 "defaultValueExpressionId": null,
141 "parameterId": null,
142 "dictionarySourceSelectionMode": "None",
143 "dataSourceAttributesAdditionsSettings": [],
144 "externalFileStorageUrl": null,
145 "filePrefix": null,
146 "defaultNewElementSettings": null,
147 "id": 111,
148 "name": null,
149 "isReadOnly": false,
150 "dataEditRuleIds": [],
151 "beforeSaveDataActions": [],
152 "afterSaveDataActions": [],
153 "discriminator": "DictionaryDataSource"
154 },
155 {
156 "pivotId": 81,
157 "parameters": [],
158 "focusOnFirstCell": true,
159 "doActionOnChangeFocusedCell": true,
160 "doActionOnChangeCellValue": true,
161 "id": 222,
162 "name": null,
163 "isReadOnly": false,
164 "dataEditRuleIds": [],
165 "beforeSaveDataActions": [],
166 "afterSaveDataActions": [],
167 "discriminator": "PivotDataSource"
168 }
169 ],
170 "parameters": [],
171 "binaryConditionsRules": [],
172 "submitValidateRules": [],
173 "expressions": [],
174 "controlsValueCalculateRules": [],
175 "actions": [
176 {
177 "dataSourcesIds": [
178 111
179 ],
180 "id": 111,
181 "comment": "Сохранение значения",
182 "discriminator": "SaveDataSourceAction"
183 },
184 {
185 "dataSourcesIds": [
186 222
187 ],
188 "id": 222,
189 "comment": "Сохранение значения",
190 "discriminator": "SaveDataSourceAction"
191 }
192 ],
193 "conditionActionIdsOnOpen": [],
194 "conditionalActions": [
195 {
196 "id": 111,
197 "binaryConditionRuleId": null,
198 "actions": [
199 111
200 ],
201 "parallelRunning": true
202 },
203 {
204 "id": 222,
205 "binaryConditionRuleId": null,
206 "actions": [
207 222
208 ],
209 "parallelRunning": true
210 }
211 ],
212 "selectionSets": [],
213 "reportTemplates": [],
214 "useNewDependenciesBuilder": null
215 }