/
execute-entities-onFocus.jigx
58 lines (54 loc) · 1.97 KB
/
execute-entities-onFocus.jigx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
title: Execute entities action on Focus
type: jig.default
description: This action allows you to modify, change, and delete multiple rows in a specific table in your database. This is an example how to use it in onFocus event.
onFocus:
type: action.execute-entities
options:
provider: DATA_PROVIDER_LOCAL
method: update
goBack: stay
entity: default/employees
data: =@ctx.datasources.employee-detail-dynamic.{'id':id, 'modify':$number(modify)+1}
header:
type: component.jig-header
options:
height: medium
children:
type: component.image
options:
source:
uri: https://images.unsplash.com/photo-1509475826633-fed577a2c71b?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2071&q=80
children:
- type: component.entity
options:
children:
- type: component.field-row
options:
children:
- type: component.entity-field
instanceId: firstname
options:
label: First name
value: =@ctx.datasources.employee-detail-dynamic.firstname
- type: component.entity-field
instanceId: lastname
options:
label: Last name
value: =@ctx.datasources.employee-detail-dynamic.lastname
- type: component.field-row
options:
children:
- type: component.entity-field
instanceId: email
options:
label: Email
value: =@ctx.datasources.employee-detail-dynamic.email
- type: component.entity-field
instanceId: phone
options:
label: Phone
value: =@ctx.datasources.employee-detail-dynamic.phone
- type: component.entity-field
options:
label: Number of execute-entity calls
value: =@ctx.datasources.employee-detail-dynamic.modify