Line 1... |
Line 1... |
1 |
/*
|
1 |
/*
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
3 |
*
|
3 |
*
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
4 |
* Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
|
5 |
*
|
5 |
*
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
9 |
* language governing permissions and limitations under the License.
|
9 |
* language governing permissions and limitations under the License.
|
Line 226... |
Line 226... |
226 |
public void run() {
|
226 |
public void run() {
|
227 |
// final SQLRowValues rowV = new
|
227 |
// final SQLRowValues rowV = new
|
228 |
// SQLRowValues(AutoCompletionManager.this.fillFrom.getTable());
|
228 |
// SQLRowValues(AutoCompletionManager.this.fillFrom.getTable());
|
229 |
final SQLRow rowV;
|
229 |
final SQLRow rowV;
|
230 |
if (r != null) {
|
230 |
if (r != null) {
|
231 |
rowV = r.asRow();
|
231 |
rowV = r.fetchNewRow(false);
|
232 |
} else {
|
232 |
} else {
|
233 |
rowV = AutoCompletionManager.this.fillFrom.getTable().getRow(id);
|
233 |
rowV = AutoCompletionManager.this.fillFrom.getTable().getRow(id);
|
234 |
}
|
234 |
}
|
235 |
// Test pour éviter de perdre la sélection d'un article ayant la même désignation
|
235 |
// Test pour éviter de perdre la sélection d'un article ayant la même désignation
|
236 |
// mais un code différent (Problème remonté par Afhymat avec la tabulation)
|
236 |
// mais un code différent (Problème remonté par Afhymat avec la tabulation)
|
Line 290... |
Line 290... |
290 |
|
290 |
|
291 |
public Set<String> getFieldsFrom() {
|
291 |
public Set<String> getFieldsFrom() {
|
292 |
return this.fillBy.keySet();
|
292 |
return this.fillBy.keySet();
|
293 |
}
|
293 |
}
|
294 |
|
294 |
|
- |
|
295 |
public String getToField(String fromField) {
|
- |
|
296 |
return this.fillBy.get(fromField);
|
- |
|
297 |
}
|
- |
|
298 |
|
295 |
public void fillRowValues(SQLRowAccessor from, Set<String> fields, SQLRowValues to) {
|
299 |
public void fillRowValues(SQLRowAccessor from, Set<String> fields, SQLRowValues to) {
|
296 |
for (String fromField : fields) {
|
300 |
for (String fromField : fields) {
|
297 |
String toField = AutoCompletionManager.this.fillBy.get(fromField);
|
301 |
String toField = AutoCompletionManager.this.fillBy.get(fromField);
|
298 |
to.put(toField, getValueFrom(from.asRow(), fromField, to));
|
302 |
to.put(toField, getValueFrom(from.asRow(), fromField, to));
|
299 |
}
|
303 |
}
|