1
|
Index: globals.js
|
2
|
===================================================================
|
3
|
--- globals.js (revision 27)
|
4
|
+++ globals.js (working copy)
|
5
|
@@ -207,12 +207,12 @@
|
6
|
var _oSelectedDatasource = this.form.selectedDataset.createDataSource(this.form.name + '_select', [JSColumn.INTEGER, JSColumn.INTEGER]),
|
7
|
_oRelation;
|
8
|
|
9
|
- if (!solutionModel.getRelation(this.form.tableName + '_to_selected')) {
|
10
|
- _oRelation = solutionModel.newRelation(this.form.tableName + '_to_selected', this.form.serverName, this.form.tableName, _oSelectedDatasource, JSRelation.INNER_JOIN);
|
11
|
+ if (!solutionModel.getRelation(this.form.name + '_' + this.form.tableName + '_to_selected')) {
|
12
|
+ _oRelation = solutionModel.newRelation(this.form.name + '_' + this.form.tableName + '_to_selected', this.form.serverName, this.form.tableName, _oSelectedDatasource, JSRelation.INNER_JOIN);
|
13
|
_oRelation.newRelationItem(this.form.pickColumn, '=', 'pickColumID');
|
14
|
_oRelation.allowCreationRelatedRecords = true;
|
15
|
}
|
16
|
- _oField = _oForm.newField(this.form.tableName + '_to_selected.selected', JSField.CHECKS, 0, 30, 23, this.form.rowHeight);
|
17
|
+ _oField = _oForm.newField(this.form.name + '_' + this.form.tableName + '_to_selected.selected', JSField.CHECKS, 0, 30, 23, this.form.rowHeight);
|
18
|
_oField.onAction = solutionModel.getForm("mod_listpicker").getFormMethod("selectOnAction");
|
19
|
while (this.form.selectedDataset.getMaxRowIndex()) {
|
20
|
this.form.selectedDataset.removeRow(1);
|
21
|
Index: forms/mod_listpicker.js
|
22
|
===================================================================
|
23
|
--- forms/mod_listpicker.js (revision 27)
|
24
|
+++ forms/mod_listpicker.js (working copy)
|
25
|
@@ -248,11 +248,11 @@
|
26
|
* @properties={typeid:24,uuid:"EE24A1D2-3B17-49F3-B1A3-0C153926CE57"}
|
27
|
*/
|
28
|
function selectOnAction(event) {
|
29
|
- if (foundset[_g_oListpicker.form.tableName + '_to_selected']) {
|
30
|
- if (foundset[_g_oListpicker.form.tableName + '_to_selected'].selected) {
|
31
|
- databaseManager.saveData(foundset[_g_oListpicker.form.tableName + '_to_selected'].getSelectedRecord());
|
32
|
+ if (foundset[_g_oListpicker.form.name + '_' + _g_oListpicker.form.tableName + '_to_selected']) {
|
33
|
+ if (foundset[_g_oListpicker.form.name + '_' + _g_oListpicker.form.tableName + '_to_selected'].selected) {
|
34
|
+ databaseManager.saveData(foundset[_g_oListpicker.form.name + '_' + _g_oListpicker.form.tableName + '_to_selected'].getSelectedRecord());
|
35
|
} else {
|
36
|
- foundset[_g_oListpicker.form.tableName + '_to_selected'].deleteRecord();
|
37
|
+ foundset[_g_oListpicker.form.name + '_' + _g_oListpicker.form.tableName + '_to_selected'].deleteRecord();
|
38
|
}
|
39
|
}
|
40
|
}
|