From version < 4.1 >
edited by gru
on 25.03.2019, 11:57
To version < 9.1 >
edited by nlo
on 10.05.2019, 15:33
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.gru
1 +XWiki.nlo
Content
... ... @@ -1,8 +1,56 @@
1 1  {{content/}}
2 2  
3 +{{id name="fig_data_source"/}}
4 +{{figure image="data_source_en.png" }}
5 +Configuration screen for creating data sources: (1) list of existing data sources, (2) area for editing the selected data source, (3) settings panel of the data source, (4) servlet URL for accessing the data source.
6 +{{/figure}}
7 +
3 3  The sources or rather data sources are lodged as text in the format CSV, JSON or XML and can be worked up through the {{designer/}}/the form.
4 4  To have an access to data sources in the script area via javascript too, all data sources are converted into a JSON structure and customized in the object {{code}}XFC_METADATA.urls.datasource_[csv|json|xml]{{/code}}. The structure of this JSON structure for the different data sources is expounded in the respective section.
5 5  
11 +== Creating a data source ==
12 +
13 +Open the module "Data > Sources" and click the button "New" {{ficon name="plus-circle-outline"/}} in the header of the list (see point 1 in [[figure>>||anchor="fig_data_source"]]). After that you will be prompted to either create an empty data source or import one from a file. Three types of data sources can be created: //XML//, //CSV// und //JSON//.
14 +
15 +{{lightbox image="data_source_new_en.png" title="Data sources can be imported or created from scratch."/}}
16 +
17 +Every data source needs:
18 +
19 +* a unique name (in the settings panel: see point 3 in [[figure>>||anchor="fig_data_source"]])
20 +* the actual data in the editing area (see point 2 in [[figure>>||anchor="fig_data_source"]])
21 +
22 +=== Import of data sources from files ===
23 +
24 +The following Data types can be used to import data sources:
25 +
26 +* **XML**: //.xml//
27 +* **CSV**: //.csv//, //.xls//, //.xlsx// (Excel)
28 +* **JSON**: //.json//
29 +
30 +{{id name="data_source_import_csv"/}}
31 +__CSV data sources__
32 +
33 +CSV data sources can be imported from different file types:
34 +
35 +* //.csv//
36 +Opens up a dialog for configuring the import:
37 +** **Delimiter**: Determines which symbol is used in the file for separating data fields/ colunms (typically: comma).
38 +** **Text qualifier**: Determines the text qualifier. This symbol is used to support special characters inside data fields (e.g. comma in numbers with decimal places).
39 +** **Start at line**: Determines where to start importing the data source from.
40 +** **Ignore empty lines**: When activated ignores empty lines during import.
41 +
42 +{{lightbox image="data_source_import_csv_en.png" title="Import dialog for CSV files"/}}
43 +
44 +* //.xls//, //.xlsx//
45 +Opens up a dialog for configuring the import:
46 +** **Sheets to import**: Determines which worksheets/tables should be imported from the file.
47 +
48 +{{lightbox image="data_source_import_excel_en.png" title="Importdialog für Excel-Dateien"/}}
49 +
50 +__Drag&Drop__
51 +
52 +Data sources can be imported by Drag&Drop as well. If a file is being dropped over the list (green area) than a new data source of the corresponding type will be created (for Excel files: one data source per worksheet will be created). If a file is being dropped over an existing data source than it will be updated. Changes will only take effect after the "Save" {{icon name="save"/}} button is clicked.
53 +
6 6  == CSV ==
7 7  
8 8  Here you can insert data sets in the CSV format.
... ... @@ -34,7 +34,7 @@
34 34  http(s):~/~/<server>/formcycle/datenquellecsv?mandantName=<Mandant-Name>&name=<Datenquellen-Name>
35 35  {{/info}}
36 36  
37 -At an access of the {{designer/}} always use the global variables object //XFC_METADATA//, see also [[global designer variables>>doc:Formular-Metadaten]]. For example it can be accessed as follows: {{code}}XFC_METADATA.urls.datasource_csv{{/code}}.
85 +At an access of the {{designer/}} always use the global variables object //XFC_METADATA//, see also [[global designer variables>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.FormMetadata]]. For example it can be accessed as follows: {{code}}XFC_METADATA.urls.datasource_csv{{/code}}.
38 38  
39 39  The following parameters are possible:
40 40  
... ... @@ -63,7 +63,7 @@
63 63  
64 64  
65 65  
66 -In the {{designer/}} the following script is used in the [[script area>>doc:TAB - Script]].
114 +In the {{designer/}} the following script is used in the [[script area>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.WebHome]].
67 67  
68 68  {{code language="javascript"}}
69 69  $.getJSON( XFC_METADATA.urls.datasource_csv + "?name=Demo&mandantName=xima.de", function(json) {
... ... @@ -83,19 +83,19 @@
83 83  
84 84  === Exeption selection element ===
85 85  
86 -{{figure image="089En.png" width="300"}}
134 +{{figure image="data_source_csv_designer_de.png"}}
87 87  The connection of a data source to a selection element takes place directly in the {{designer/}}
88 88  {{/figure}}
89 89  
90 -If the //CSV// data source has to be loaded directly in a [[selection element>>doc:Auswahl]], this happens via through the properties of the selection element in the {{designer/}}.
138 +If the //CSV// data source has to be loaded directly in a [[selection element>>doc:Formcycle.FormDesigner.FormElements.Selection]], this happens via through the properties of the selection element in the {{designer/}}.
91 91  
92 -The content of the CSV data source is processed in a [[selection element>>doc:Auswahlelement]].
140 +The content of the CSV data source is processed in a [[selection element>>doc:Formcycle.FormDesigner.FormElements.Selection]].
93 93  
94 94  {{code}}
95 95  visible value, assigned value, optional value, optional valuesichtbarer wert, ...
96 96  {{/code}}
97 97  
98 -If more than the visible and the assigned value are indicated, so optional values, the can be invoked in Javascript through the following jQuery selector.
146 +If more than the visible and the assigned value are indicated, so optional values, the can be invoked in JavaScript through the following jQuery selector.
99 99  
100 100  {{code language="javascript"}}
101 101  $('[name=sel2]').find('option:selected').attr('col0');
... ... @@ -105,7 +105,7 @@
105 105  
106 106  == XML ==
107 107  
108 -The XML data source acts analogously to the //CSV// data source, but cannot be bound to a [[selection element>>doc:Auswahl]].
156 +The XML data source acts analogously to the //CSV// data source, but cannot be bound to a [[selection element>>doc:Formcycle.FormDesigner.FormElements.Selection]].
109 109  
110 110  {{figure image="datenquelle_xml.png" width="300"}}
111 111  The JSON structure of the XML data source. To this JSON structure can than be accessed to {{code}}XFC_METADATA.urls.datasource_[csv|json|xml]{{/code}} via Javascript.
... ... @@ -148,7 +148,7 @@
148 148  http(s):~/~/<server>/formcycle/datenquellexml?mandantName=<Mandant-Name>&name=<Datenquellen-Name>
149 149  {{/info}}
150 150  
151 -If you access from the {{designer/}}, always use the global variable object //XFC_METADATA//, see also [[global designer variables>>doc:Formular-Metadaten]]. For example it can be accessed as follows: {{code language="javascript"}}XFC_METADATA.urls.datasource_xml{{/code}}.
199 +If you access from the {{designer/}}, always use the global variable object //XFC_METADATA//, see also [[global designer variables>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.FormMetadata]]. For example it can be accessed as follows: {{code language="javascript"}}XFC_METADATA.urls.datasource_xml{{/code}}.
152 152  
153 153  The following parameter are possible:
154 154  
... ... @@ -158,7 +158,7 @@
158 158  
159 159  == JSON ==
160 160  
161 -The //JSON// data source acts analogously to the //CSV// data source, but cannot be bound to a [[selection element>>doc:Auswahl]] directly.
209 +The //JSON// data source acts analogously to the //CSV// data source, but cannot be bound to a [[selection element>>doc:Formcycle.FormDesigner.FormElements.Selection]] directly.
162 162  
163 163  {{figure image="datenquelle_json.png" width="300"}}
164 164  The JSON structure of the JSON data source. It is identically equal to the JSON data source. This JSON structure can be accessed via Javascript through {{code}}XFC_METADATA.urls.datasource_[csv|json|xml]{{/code}}.
... ... @@ -188,7 +188,7 @@
188 188  http(s):~/~/<server>/formcycle/datenquellejson?mandantName=<Mandant-Name>&name=<Datenquellen-Name>
189 189  {{/info}}
190 190  
191 -At an access from the {{designer/}} always use the global variable object //XFC_METADATA//, see also [[global designer variables>>doc:Formular-Metadaten]]. For example you can access as follows: {{code language="javascript"}}XFC_METADATA.urls.datasource_json{{/code}}.
239 +At an access from the {{designer/}} always use the global variable object //XFC_METADATA//, see also [[global designer variables>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.FormMetadata]]. For example you can access as follows: {{code language="javascript"}}XFC_METADATA.urls.datasource_json{{/code}}.
192 192  
193 193  The following parameter are possible:
194 194  
Copyright 2000-2024