Платформа 3V/Формы/Действия/Сохранение источников: различия между версиями
< Платформа 3V | Формы | Действия
Перейти к навигации
Перейти к поиску
(Новая страница: «Действие, которое сохраняет добавленный элемент в Платформа_3V/Формы/Источники_данных|''...») |
|||
(не показано 13 промежуточных версий 2 участников) | |||
Строка 3: | Строка 3: | ||
{ | { | ||
"dataSourcesIds": [ | "dataSourcesIds": [ | ||
− | + | 1, | |
+ | 2 | ||
], | ], | ||
− | "id": | + | "id": 1, |
− | "comment": "Сохранение | + | "comment": "Сохранение источников", |
"discriminator": "SaveDataSourceAction" | "discriminator": "SaveDataSourceAction" | ||
} | } | ||
Строка 25: | Строка 26: | ||
|} | |} | ||
+ | Примечание: | ||
+ | если в dataSourcesIds не указан ни один элемент, то будут сохраняться все источники "isReadOnly": false | ||
+ | ==Пример использования(сохранение в справочнике)== | ||
+ | Кейс: Сохранить изменения в справочнике. | ||
− | + | Добавить действие, где указать [[Платформа_3V/Формы/Источники_данных|'''источник данных''']], в котором требуется сохранять изменения. Сохранение происходит при нажатии кнопки. | |
− | + | ||
+ | [[Файл:Сохранение справочника2.gif|мини|слева]] | ||
+ | <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: | Строка 42: | ||
<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: | Строка 87: | ||
"controlsValueCalculateRulesIds": [], | "controlsValueCalculateRulesIds": [], | ||
"conditionalActions": [ | "conditionalActions": [ | ||
+ | 111, | ||
222 | 222 | ||
], | ], | ||
"onBeforeClickConditionalActions": [], | "onBeforeClickConditionalActions": [], | ||
"id": 112, | "id": 112, | ||
− | "caption": " | + | "caption": "Сохранить", |
"enable": true, | "enable": true, | ||
"visible": true, | "visible": true, | ||
Строка 102: | Строка 138: | ||
"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": [ |
+ | { | ||
+ | "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": | + | "pivotId": 81, |
"parameters": [], | "parameters": [], | ||
"focusOnFirstCell": true, | "focusOnFirstCell": true, | ||
Строка 113: | Строка 204: | ||
"id": 222, | "id": 222, | ||
"name": null, | "name": null, | ||
− | "isReadOnly": | + | "isReadOnly": false, |
"dataEditRuleIds": [], | "dataEditRuleIds": [], | ||
"beforeSaveDataActions": [], | "beforeSaveDataActions": [], | ||
Строка 125: | Строка 216: | ||
"expressions": [], | "expressions": [], | ||
"controlsValueCalculateRules": [], | "controlsValueCalculateRules": [], | ||
− | "actions": [ | + | "actions": [ |
+ | { | ||
+ | "dataSourcesIds": [ | ||
+ | 111 | ||
+ | ], | ||
+ | "id": 111, | ||
+ | "comment": "Сохранение значения", | ||
+ | "discriminator": "SaveDataSourceAction" | ||
+ | }, | ||
{ | { | ||
"instanceId": 222, | "instanceId": 222, | ||
Строка 134: | Строка 233: | ||
], | ], | ||
"conditionActionIdsOnOpen": [], | "conditionActionIdsOnOpen": [], | ||
− | "conditionalActions": [ | + | "conditionalActions": [ |
+ | { | ||
+ | "id": 111, | ||
+ | "binaryConditionRuleId": null, | ||
+ | "actions": [ | ||
+ | 111 | ||
+ | ], | ||
+ | "parallelRunning": true | ||
+ | }, | ||
{ | { | ||
"id": 222, | "id": 222, |
Текущая версия на 18:46, 31 января 2022
Действие, которое сохраняет добавленный элемент в источнике данных, имеет следующую структуру:
1 {
2 "dataSourcesIds": [
3 1,
4 2
5 ],
6 "id": 1,
7 "comment": "Сохранение источников",
8 "discriminator": "SaveDataSourceAction"
9 }
Описание свойств действия
Свойство | Описание |
---|---|
dataSourcesIds | Идентификаторы источников данных |
id | Идентификатор действия |
comment | Описание действия |
discriminator | SaveDataSourceAction |
Примечание: если в dataSourcesIds не указан ни один элемент, то будут сохраняться все источники "isReadOnly": false
Пример использования(сохранение в справочнике)
Кейс: Сохранить изменения в справочнике.
Добавить действие, где указать источник данных, в котором требуется сохранять изменения. Сохранение происходит при нажатии кнопки.
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 222
49 ],
50 "onBeforeClickConditionalActions": [],
51 "id": 112,
52 "caption": "Сохранить",
53 "enable": true,
54 "visible": true,
55 "hint": null,
56 "uiDataSource": null,
57 "doActionOnChangeValue": false,
58 "onAfterChangeValueConditionalActions": null,
59 "onAfterChangeValueByClientConditionalActions": null,
60 "enableRuleIds": [],
61 "visibleRuleIds": [],
62 "access": {
63 "read": {
64 "roles": [],
65 "inversion": false,
66 "default": true
67 },
68 "edit": {
69 "roles": [],
70 "inversion": false,
71 "default": true
72 }
73 },
74 "isValueChanged": false,
75 "expressionId": null,
76 "discriminator": "CustomButtonEntry"
77 },
78 {
79 "pivotSourceId": 222,
80 "doActionOnChangeFocusedCell": true,
81 "doActionOnChangeCellValue": false,
82 "id": 222,
83 "caption": null,
84 "enable": false,
85 "visible": true,
86 "hint": null,
87 "uiDataSource": null,
88 "doActionOnChangeValue": false,
89 "onAfterChangeValueConditionalActions": null,
90 "onAfterChangeValueByClientConditionalActions": null,
91 "rebuildDependentsObjectOnChange": true,
92 "enableRuleIds": [],
93 "visibleRuleIds": [],
94 "access": null,
95 "isValueChanged": false,
96 "expressionId": null,
97 "discriminator": "PivotSourceEntry"
98 },
99 {
100 "defaultValue": null,
101 "value": null,
102 "id": 21,
103 "caption": "Номер договора",
104 "enable": true,
105 "visible": true,
106 "hint": null,
107 "uiDataSource": {
108 "attributeId": 21,
109 "sourceId": 111,
110 "discriminator": "UiDataSourceDictionary"
111 },
112 "doActionOnChangeValue": false,
113 "discriminator": "StringSourceEntry"
114 },
115 {
116 "defaultValue": null,
117 "value": null,
118 "id": 22,
119 "caption": "Дата заключения",
120 "enable": true,
121 "visible": true,
122 "hint": null,
123 "uiDataSource": {
124 "attributeId": 22,
125 "sourceId": 111,
126 "discriminator": "UiDataSourceDictionary"
127 },
128 "doActionOnChangeValue": false,
129 "discriminator": "StringSourceEntry"
130 }
131 ],
132 "entryDataSources": [
133 {
134 "dictionaryId": 80,
135 "hierarchyId": null,
136 "filter": null,
137 "sortingOptions": null,
138 "groupingOptions": null,
139 "dictionaryAttributes": null,
140 "defaultValue": [],
141 "defaultValueExpressionId": null,
142 "parameterId": null,
143 "dictionarySourceSelectionMode": "None",
144 "dataSourceAttributesAdditionsSettings": [],
145 "externalFileStorageUrl": null,
146 "filePrefix": null,
147 "defaultNewElementSettings": null,
148 "id": 111,
149 "name": null,
150 "isReadOnly": false,
151 "dataEditRuleIds": [],
152 "beforeSaveDataActions": [],
153 "afterSaveDataActions": [],
154 "discriminator": "DictionaryDataSource"
155 },
156 {
157 "pivotId": 81,
158 "parameters": [],
159 "focusOnFirstCell": true,
160 "doActionOnChangeFocusedCell": true,
161 "doActionOnChangeCellValue": true,
162 "id": 222,
163 "name": null,
164 "isReadOnly": false,
165 "dataEditRuleIds": [],
166 "beforeSaveDataActions": [],
167 "afterSaveDataActions": [],
168 "discriminator": "PivotDataSource"
169 }
170 ],
171 "parameters": [],
172 "binaryConditionsRules": [],
173 "submitValidateRules": [],
174 "expressions": [],
175 "controlsValueCalculateRules": [],
176 "actions": [
177 {
178 "dataSourcesIds": [
179 111
180 ],
181 "id": 111,
182 "comment": "Сохранение значения",
183 "discriminator": "SaveDataSourceAction"
184 },
185 {
186 "instanceId": 222,
187 "id": 222,
188 "comment": "Ребилд пивота",
189 "discriminator": "RebuildSourceInstanceAction"
190 }
191 ],
192 "conditionActionIdsOnOpen": [],
193 "conditionalActions": [
194 {
195 "id": 111,
196 "binaryConditionRuleId": null,
197 "actions": [
198 111
199 ],
200 "parallelRunning": true
201 },
202 {
203 "id": 222,
204 "binaryConditionRuleId": null,
205 "actions": [
206 222
207 ],
208 "parallelRunning": false
209 }
210 ],
211 "selectionSets": [],
212 "reportTemplates": [],
213 "useNewDependenciesBuilder": null
214 }