-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.xml
672 lines (557 loc) · 20 KB
/
module.xml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
<!--@POSTPROC: ./postproc.sh-->
<module>
<User_List f="nodata">
<User_List f="noscroll">
<User_List t="list" f="nolabel user" l="Control"/>
</User_List>
<Manual>
<Manual t="webview" f="nolabel"/>
</Manual>
</User_List>
<Control f="nodata">
<Map f="noscroll">
<!--SRID: 32635-->
<Map t="map" f="nolabel"/>
<!--<Create_Record l="..."/> Added via @POSTPROC, but in columns-->
</Map>
<IDs>
<Create_Feature l="Feature"/>
<cols>
<GC_Value t="dropdown" vp="Feature/GControl/GC"/>
<Colour_to_Assign t="dropdown">
<!--Populated in logic-->
</Colour_to_Assign>
<Assign_Colour t="button"/>
</cols>
<Next_Point_ID b="decimal"/>
<Next_Line_ID b="decimal"/>
<Next_Polygon_ID b="decimal"/>
</IDs>
<search>
<!--"Select User" dropdown has been added using @POSTPROC-->
</search>
<Vars f="hidden nowire">
<Create_Shape l="Shape"/>
</Vars>
</Control>
<Feature>
<fmt>{{ID}}</fmt>
<Main>
<cols>
<ID c="readonly"/>
<author/>
</cols>
<timestamp/>
<gps f="notnull"/>
<Find_This_in_The_Map l="Control/Map">
Find This in The Map...
</Find_This_in_The_Map>
<Feature_Type f="persist">
<desc>Comment on Feature type</desc>
<opts>
<opt>Mound</opt>
<opt>Surface feature</opt>
<opt>Artefact concentration</opt>
<opt>Other</opt>
</opts>
</Feature_Type>
<Map_Symbol f="notnull">
<opts>
<opt>Hairy brown circle</opt>
<opt>Black diamond with a dot inside</opt>
<opt>Hairy black diamond with a dot inside</opt>
<opt>Black triangle with a dot inside</opt>
<opt>Hairy black triangle with a dot inside</opt>
<opt>Other (describe in annotation)</opt>
</opts>
</Map_Symbol>
<Source f="persist">
<opts>
<opt>Topomap - 50k</opt>
<opt>Topomap - 5k</opt>
<opt>Topomap - Other</opt>
<opt>Atlas</opt>
<opt>GC</opt>
<opt>Field survey</opt>
</opts>
</Source>
<Note/>
</Main>
<GControl>
<GC>
<opts>
<opt>Yes</opt>
<opt>Attempted and Failed</opt>
<opt>No</opt>
<opt>No Observation</opt>
</opts>
</GC>
<Date_Completed b="date"/>
<Description/>
<Classification>
<opts>
<opt>TP</opt>
<opt>FP</opt>
<opt>FN</opt>
<opt>FP</opt>
<opt>Indeterminate</opt>
<opt>Classificaiton Error</opt>
</opts>
</Classification>
<Other_Description>
<desc>Comment on any issues surrounding GC. E.g. Feature not found. Feature offset</desc>
</Other_Description>
<Picture f="nocertainty" t="camera"/>
</GControl>
</Feature>
<Shape>
<fmt>{{Line_ID}}{{Polygon_ID}} {{author}}</fmt>
<Shape_Note>
<cols>
<Line_ID f="readonly"/>
<Polygon_ID f="readonly"/>
</cols>
<Label/>
<Note/>
</Shape_Note>
<Vars f="hidden nowire">
<author/>
</Vars>
</Shape>
<logic><![CDATA[
String DATA_ENTRY_LAYER;
int DATA_ENTRY_LAYER_ID;
/**************************** SHAPE AUTONUMBERING *****************************/
AUTONUM_DEST_TO_SOURCE.put("Feature/Main/ID", "Control/IDs/Next_Point_ID");
AUTONUM_DEST_TO_SOURCE.put("Shape/Shape_Note/Line_ID", "Control/IDs/Next_Line_ID");
AUTONUM_DEST_TO_SOURCE.put("Shape/Shape_Note/Polygon_ID", "Control/IDs/Next_Polygon_ID");
for (String ref : AUTONUM_DEST_TO_SOURCE.values())
persistOverSessions(ref, "1");
boolean geoListHasInstanceOf(Class clazz) {
List geometry = getGeometryList(MAP_REF, DATA_ENTRY_LAYER_ID);
for (Geometry g : geometry)
if (clazz.isInstance(g))
return true;
return false;
}
void incShapeAutoNum() {
String refLine = "Shape/Shape_Note/Line_ID";
String refPoly = "Shape/Shape_Note/Polygon_ID";
if (geoListHasInstanceOf(Line .class)) incAutoNum(refLine);
if (geoListHasInstanceOf(Polygon.class)) incAutoNum(refPoly);
}
void incFeatureAutoNum() {
String refPoint = "Feature/Main/ID";
incAutoNum(refPoint);
}
addOnEvent("Shape", "create", "incShapeAutoNum()");
addOnEvent("Feature", "create", "incFeatureAutoNum()");
addOnEvent("Shape", "copy", "incShapeAutoNum()");
addOnEvent("Feature", "copy", "incFeatureAutoNum()");
/************************************ MAP *************************************/
boolean DO_FILL_IN_GPS_FOR_FEATURE = false;
void clearGeometry() {
List geometry = getGeometryList(MAP_REF, DATA_ENTRY_LAYER_ID);
if (geometry == null) return;
if (geometry.size() == 0) return;
for (geom : geometry) {
print("Geometry cleared:" + geom.userData.geomId);
clearGeometry(MAP_REF, geom.userData.geomId);
}
}
boolean checkForGeometry() {
List geometry = getGeometryList(MAP_REF, DATA_ENTRY_LAYER_ID);
if (geometry == null || geometry.size() != 1) {
String head = "Cannot Create Record";
String body = "Exactly one shape must be present on the data entry layer.";
showWarning(head, body);
return false;
} else {
return true;
}
}
void onClickControlCreateRecord() {
if (geoListHasInstanceOf(Point .class)) DO_FILL_IN_GPS_FOR_FEATURE = true;
if (geoListHasInstanceOf(Point .class)) onClickControlCreateFeature();
if (geoListHasInstanceOf(Line .class)) onClickControlCreateShape();
if (geoListHasInstanceOf(Polygon.class)) onClickControlCreateShape();
}
void centreMe() {
if(!isExternalGPSOn() && !isInternalGPSOn()) {
showToast("{GPS_Not_Initialised}");
} else {
centerOnCurrentPosition(MAP_REF);
}
}
void refreshMap() {
refreshMap(MAP_REF);
}
boolean findThisInTheMap() {
String EasStr = getFieldValue("Feature/Main/Easting");
String norStr = getFieldValue("Feature/Main/Northing");
boolean isFindable = !isNull(EasStr) && !isNull(norStr);
if (!isFindable) {
String head = "";
String body = "";
head += "Cannot Find Point in Map";
body += "The 'Northing' and 'Easting' fields must be filled in. Please ";
body += "tap the 'Take From GPS' button to do so.";
showWarning(head, body);
return false;
}
double easDub = Double.parseDouble(EasStr);
double norDub = Double.parseDouble(norStr);
setMapFocusPoint(MAP_REF, easDub, norDub);
return true;
}
void fillInGPSForFeature() {
String gpsRefsPattern = "Feature/*/" + PATTERN_GPS;
List gpsRefs = getRefsMatching(gpsRefsPattern);
List nulls = new ArrayList();
for (String ref : gpsRefs) nulls.add(isNull(getFieldValue(ref)));
boolean hasGps = !any(nulls);
if (!hasGps && DO_FILL_IN_GPS_FOR_FEATURE)
fillInGPS("Feature");
DO_FILL_IN_GPS_FOR_FEATURE = false;
}
addOnEventCond("Feature/Main/Find_This_in_The_Map", "click", "findThisInTheMap()");
addOnEventCond("Control/Map/Create_Record", "click", "checkForGeometry()");
addOnEvent ("Control/Map/Create_Record", "click", "onClickControlCreateRecord()");
addOnEvent(
"Control/Map/Create_Record",
"click",
"setAutoSaveGeometry(getGeometryList(MAP_REF, DATA_ENTRY_LAYER_ID))",
Integer.MAX_VALUE
);
addOnEvent("Feature", "save", "clearGeometry()");
addOnEvent("Feature", "firstsave", "fillInGPSForFeature()");
addOnEvent("Shape", "save", "clearGeometry()");
addOnEvent("Control/Map", "show", "refreshMap()");
addOnEvent("Control/Map", "show", "redrawGcValueLayers()");
/*********************************** COLORS ***********************************/
Map COLOR_TO_NAME = new HashMap();
COLOR_TO_NAME.put(Color.BLACK, "Black");
COLOR_TO_NAME.put(Color.BLUE, "Blue");
COLOR_TO_NAME.put(Color.CYAN, "Cyan");
COLOR_TO_NAME.put(Color.DKGRAY, "Dkgray");
COLOR_TO_NAME.put(Color.GRAY, "Gray");
COLOR_TO_NAME.put(Color.GREEN, "Green");
COLOR_TO_NAME.put(Color.LTGRAY, "Ltgray");
COLOR_TO_NAME.put(Color.MAGENTA, "Magenta");
COLOR_TO_NAME.put(Color.RED, "Red");
COLOR_TO_NAME.put(Color.TRANSPARENT, "Transparent");
COLOR_TO_NAME.put(Color.WHITE, "White");
COLOR_TO_NAME.put(Color.YELLOW, "Yellow");
String colorToName(int color) {
return COLOR_TO_NAME.get(color);
}
String colorToName(String color) {
int colour = Integer.parseInt(color);
return colorToName(colour);
}
/****************************** GIS POINT STYLES ******************************/
Stack GC_VALUE_LAYER_IDS = new Stack();
void initDefaultColours() {
insertIntoLocalSettings("{Yes}", "" + Color.GREEN, false);
insertIntoLocalSettings("{Attempted_and_Failed}", "" + Color.YELLOW, false);
insertIntoLocalSettings("{No}", "" + Color.RED, false);
insertIntoLocalSettings("{No_Observation}", "" + Color.BLUE, false);
}
void populateColourToAssign() {
String ref = "Control/IDs/Colour_to_Assign";
List opts = new ArrayList();
for (entry : COLOR_TO_NAME.entrySet()) {
String name = entry.getValue();
String colour = entry.getKey() + "";
opts.add(new NameValuePair(name, colour));
}
populateMenu(ref, opts);
}
void assignColor() {
String refGcVal = "Control/IDs/GC_Value";
String refColour = "Control/IDs/Colour_to_Assign";
String gcVal = getMenuValue (refGcVal);
String colour = getFieldValue(refColour);
if (isNull(gcVal)) {
String head = "'GC Value' must contain a value";
String body = "Please select a GC Value.";
showWarning(head, body);
return;
}
if (isNull(colour)) {
String head = "'Colour to Assign' must contain a value";
String body = "Please select a colour to assign to a GC Value.";
showWarning(head, body);
return;
}
insertIntoLocalSettings(gcVal, colour);
clearField(refGcVal);
clearField(refColour);
refreshMap();
redrawGcValueLayers();
String msg = "GC value '%s' reassigned to %s";
msg = replaceFirst(msg, gcVal);
msg = replaceFirst(msg, colorToName(colour));
showToast(msg);
}
void setDefaultGCOption() {
setMenuValue("Feature/GControl/GC", "{No}");
}
initDefaultColours();
addOnEvent("Control/IDs/Assign_Colour", "click", "assignColor()");
addOnEvent("Feature", "create", "setDefaultGCOption()");
/* Displays the geometry of each entity whose menu, by the name of `attribName`,
* has `vocabName` saved in it. The geometry is displayed in whatever colour is
* given by `geoColor`.
*
* The geometry is displayed in a layer called `layerName`. This is a
* human-readable name that the user can use to toggle the visibility of the
* geometry in the UI.
*/
void showDatabaseLayerByVocabName(
String attribName,
String vocabName,
int geoColor, /* Example argument: Color.BLACK */
String layerName
) {
int transBlk = Color.parseColor("#AA000000");
GeometryStyle sln_ = createLineStyle(10, transBlk, 0.01f, 0.3f, null);
// Define arguments to `showDatabaseLayer`
String q;
q = "SELECT uuid, aenttimestamp";
q += " FROM latestNonDeletedArchEnt";
q += " JOIN latestnondeletedaentvalue USING (uuid)";
q += " JOIN attributekey USING (attributeid)";
q += " JOIN vocabulary USING (vocabid)";
q += " WHERE {vocabName} IN ('', vocabname)";
q += " AND {attribName} IN ('', attributename)";
q = dbReplaceFirst(q, "{vocabName}", vocabName);
q = dbReplaceFirst(q, "{attribName}", attribName);
boolean isEntity = true;
GeometryStyle spt = createPointStyle(10, geoColor, 0.2f, 0.5f);
GeometryStyle sln = createLineStyle(10, geoColor, 0.05f, 0.3f, null);
GeometryStyle spg = createPolygonStyle(10, geoColor, sln_);
GeometryTextStyle stx = createTextStyle(
10,
Color.BLACK,
40,
Typeface.SANS_SERIF
);
int layerId = showDatabaseLayer(
MAP_REF,
layerName,
isEntity,
layerName,
q,
spt,
sln,
spg,
stx
);
GC_VALUE_LAYER_IDS.push(layerId);
}
void showDatabaseLayerByVocabName(
String vocabName,
int geoColor,
String layerName
) {
showDatabaseLayerByVocabName("", vocabName, geoColor, layerName);
}
String getLayerName(String vocabName, int geoColor) {
String layerName = "";
layerName += guessArch16nValFromKey(vocabName);
String colorName = colorToName(geoColor);
if (colorName != null)
layerName += replaceFirst(" (%s)", colorName);
return layerName;
}
void showDatabaseLayerByVocabName(String vocabName, int geoColor) {
String layerName = getLayerName(vocabName, geoColor);
showDatabaseLayerByVocabName(vocabName, geoColor, layerName);
}
void showDatabaseLayerByVocabName(
String attribName,
String vocabName,
int geoColor
) {
String layerName = getLayerName(vocabName, geoColor);
showDatabaseLayerByVocabName(attribName, vocabName, geoColor, layerName);
}
void redrawGcValueLayers() {
// Remove the old layers
while (!GC_VALUE_LAYER_IDS.empty())
removeLayer(MAP_REF, GC_VALUE_LAYER_IDS.pop());
// Get the list of vocabNames in the GC dropdown. Store them in gcVocabNames
String refGcVal = "Feature/GControl/GC";
List gcVocabNames = getMenuEntries(getAttributeName(refGcVal));
List gcVocabNames_ = new ArrayList();
for (v : gcVocabNames)
gcVocabNames_.add(v.get(1));
gcVocabNames = gcVocabNames_;
// Convert gcVocabNames to gcVocabNamesString, which is what'll become part of
// a query
String gcVocabNamesString;
gcVocabNames = new ArrayList(gcVocabNames);
for (int i = 0; i < gcVocabNames.size(); i++) {
String s = dbReplaceFirst("%s", gcVocabNames.get(i));
gcVocabNames.set(i, s);
}
String gcVocabNamesString = gcVocabNames.toString()
.replace("[", "(")
.replace("]", ")");
String q = "SELECT key, value FROM localsettings WHERE key IN %s";
q = replaceFirst(q, gcVocabNamesString);
FetchCallback showDatabaseLayersByVocabName = new FetchCallback() {
onFetch(result) {
if (result == null) result = new ArrayList();
for (row : result) {
String gcVal = row.get(0);
String colour = row.get(1); int colourInt = Integer.parseInt(colour);
showDatabaseLayerByVocabName("GC", gcVal, colourInt);
}
}
};
fetchAll(q, showDatabaseLayersByVocabName);
}
/********************************** MAP INIT **********************************/
void initMap() {
showBaseMap(MAP_REF, "Base Map", "files/data/K-35-053-3_Elenovo.tif");
setMapZoom(MAP_REF, 15.0f);
// Shape
isEntity = true;
queryName = "Shape";
querySQL = "SELECT uuid, aenttimestamp FROM latestNonDeletedArchEnt join aenttype using (aenttypeid) where aenttypename = 'Shape'";
ps = createPointStyle(10, Color.YELLOW, 0.2f, 0.5f);
ls = createLineStyle(10, Color.YELLOW, 0.05f, 0.3f, null);
pos = createPolygonStyle(10, Color.parseColor("#440000FF"), createLineStyle(10, Color.parseColor("#AA000000"), 0.01f, 0.3f, null));
ts = createTextStyle(10, Color.YELLOW, 30, Typeface.SANS_SERIF);
showDatabaseLayer(MAP_REF, "Shape Layer", isEntity, queryName, querySQL, ps, ls, pos, ts);
// Data entry layer
DATA_ENTRY_LAYER = "Data Entry Layer";
DATA_ENTRY_LAYER_ID = createCanvasLayer(MAP_REF, DATA_ENTRY_LAYER);
setSelectedLayer(MAP_REF, DATA_ENTRY_LAYER);
}
initMap();
populateColourToAssign();
/****************************** SEARCH EXTENSION ******************************/
/* Implements an extension to the search page which allows users to */
/* constrain their searches by user. */
/******************************************************************************/
delOnEvent("Control/Search", "show", "search()");
addOnEvent("Control/Search", "show", "populateSelectUser()");
addOnEvent("Control/Search/Select_User", "click", "search()");
entityTypes = new ArrayList();
entityTypes.add(new NameValuePair("{All}", ""));
entityTypes.add(new NameValuePair("{Feature}", "Feature"));
entityTypes.add(new NameValuePair("{Shape} (Line)", "Shape LINESTRING"));
entityTypes.add(new NameValuePair("{Shape} (Polygon)", "Shape POLYGON"));
populateDropDown("Control/Search/Entity_Types", entityTypes);
void populateSelectUser(){
String refSearchUsers = "Control/Search/Select_User";
String getNonDeletedUsersQuery = "SELECT userid, fname || ' ' || lname "+
" FROM user "+
" WHERE userdeleted is null "+
" UNION " +
"SELECT -1, '{All}'";
fetchAll(getNonDeletedUsersQuery, new FetchCallback() {
onFetch(result) {
populateDropDown(refSearchUsers, result, false);
search();
}
});
}
// Overrides auto-generated definition
void search(){
String tabgroup = "Control";
String refEntityList = tabgroup + "/Search/Entity_List";
String refSearchTerm = tabgroup + "/Search/Search_Term";
String refEntityTypes = tabgroup + "/Search/Entity_Types";
String refSelectUser = tabgroup + "/Search/Select_User";
String type = getSearchArchEntType(refEntityTypes);
String term = getFieldValue (refSearchTerm);
String user = getFieldValue (refSelectUser);
String geo = getSearchGeoType (refEntityTypes);
if (isNull(user)) return;
String searchQuery = "SELECT uuid, response, aenttypename " +
" FROM latestNonDeletedArchEntFormattedIdentifiers " +
" JOIN latestnondeletedarchent USING (uuid) " +
" WHERE uuid in (SELECT uuid " +
" FROM latestNonDeletedArchEntIdentifiers " +
" WHERE measure LIKE '{term}%' " +
" AND ( aenttypename = '{type}' OR '' = '{type}' ) " +
" AND ( userid = {user} OR -1 = {user}) " +
" ) " +
" AND (geometrytype(geometryn(geospatialcolumn, 1)) = '{geo}' OR '{geo}' = '')" +
" ORDER BY substr(uuid,7,13) DESC " +
" LIMIT ? " +
"OFFSET ?";
searchQuery = replaceFirst(searchQuery, "{term}", term);
searchQuery = replaceFirst(searchQuery, "{type}", type);
searchQuery = replaceFirst(searchQuery, "{type}", type);
searchQuery = replaceFirst(searchQuery, "{user}", user);
searchQuery = replaceFirst(searchQuery, "{user}", user);
searchQuery = replaceFirst(searchQuery, "{geo}", geo);
searchQuery = replaceFirst(searchQuery, "{geo}", geo);
populateCursorList(refEntityList, searchQuery, 25);
refreshTabgroupCSS(tabgroup);
Log.d("Module", "Search query: " + searchQuery);
}
String getSearchArchEntType(String ref) {
String val = getFieldValue(ref);
if (isNull(val))
val = "";
String[] vals = val.split(" ");
if (vals.length >= 1)
return vals[0];
return "";
}
String getSearchGeoType(String ref) {
String val = getFieldValue(ref);
if (isNull(val))
val = "";
String[] vals = val.split(" ");
if (vals.length >= 2)
return vals[1];
return "";
}
setFileSyncEnabled(false);
setSyncEnabled (false);
/************************** VALIDATION UPON LEAVING ***************************/
final String PATTERN_GPS =
"(" +
"(Longitude)|" +
"(Latitude)|" +
"(Easting)|" +
"(Northing)" +
")";
void validateTabGroupOnLeave() {
Set tabGroups = getTakeFromGpsMappings().keySet();
String prevTabGroup = getPreviouslyDisplayedTabGroup();
if (!tabGroups.contains(prevTabGroup))
return;
String refsToValidatePattern =
"(" + prevTabGroup + "/*/" + PATTERN_GPS + ")" +
"|(*/Map_Symbol)";
List refsToValidate = getRefsMatching(refsToValidatePattern);
List invalidRefs = new ArrayList();
for (String ref : refsToValidate)
if (isNull(getFieldValue(ref)))
invalidRefs.add(ref);
boolean isValid = invalidRefs.size() == 0;
if (!isValid) {
String head, body, cbOk, cbBad;
head = "Previous Tab Group Contains Invalid Data";
body = "The following fields in the previous tab group should be filled ";
body += "in:\n";
for (String ref : invalidRefs) body += "-\t" + getArch16nKey(ref) + "\n";
body += "Press 'OK' to return to the record and fill in the invalid ";
body += "fields, or 'Cancel' to dismiss this message.";
cbOk = "loadEntityFrom(getUuid(\"" + prevTabGroup + "\"))";
cbBad = "";
showAlert(head, body, cbOk, cbBad);
}
}
for (String ref : getTabGroups())
addOnEvent(ref, "leave", "validateTabGroupOnLeave()");
]]></logic>
</module>