Inhalt · Anhänge (0)
Von Version 10.1
bearbeitet von ludwig
am 08.03.2017
Auf Version 11.1
bearbeitet von ludwig
am 08.03.2017
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Inhaltsänderungen

... ... @@ -3,7 +3,7 @@
3 3
4 4 = How to store data of first and last file in Multi File Import in separate objects =
5 5
6 -For this example the customer demanded an separate visualisation of data of first and last test in an endurance testing with thousends of fiiles, evaluated by {{jbeam-sign/}} with Multi File Import. To solve that requirement, we used two memory functions in {{jbeam-sign/}}. This functions were named "first_test" and "last_test" and got the file importer as producer. To trigger this memory functions we used a Groovy-script in Multi File Import. This script was executed by Multi File Import after each file. The script contained the following source:
6 +For this example the customer demanded an separate visualisation of data of first and last test in an endurance testing with thousends of files, evaluated by {{jbeam-sign/}} with Multi File Import. To solve that requirement, we used two memory functions in {{jbeam-sign/}}. This functions were named "first_test" and "last_test" and got the file importer as producer. To trigger this memory functions we used a Groovy-script in Multi File Import. This script was executed by Multi File Import after each file. The script contained the following source:
7 7
8 8 {{code language="java"}}
9 9 println "Groovy script invoked.";
... ... @@ -14,14 +14,14 @@
14 14 println "MultiImport nextFileIndex: " + miComp.getSelectedFileIndex();
15 15 fileIndex = miComp.getSelectedFileIndex();
16 16 if (fileIndex == 0) {
17 - doc1Comp.copyDataObjects();
18 - doc2Comp = jC.getComponentByName("last_test");
19 - doc2Comp.getResultObject(1).clear();
17 + doc1Comp.copyDataObjects();
18 + doc2Comp = jC.getComponentByName("last_test");
19 + doc2Comp.getResultObject(1).clear();
20 20 }
21 21
22 22 if (fileIndex == miComp.getFilesCount() - 1) {
23 - doc2Comp = jC.getComponentByName("last_test");
24 - doc2Comp.copyDataObjects();
23 + doc2Comp = jC.getComponentByName("last_test");
24 + doc2Comp.copyDataObjects();
25 25 }
26 26
27 27 return;

Copyright by Kistler Chemnitz GmbH 2021
XWiki Enterprise 4.4 - Documentation