... |
... |
@@ -8,6
+8,54 @@ |
8 |
8 |
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. |
9 |
9 |
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. |
10 |
10 |
|
|
11 |
+{{info}} |
|
12 |
+**Servlet URL** |
|
13 |
+The servlet URL of a data source will be displayed on the configuration screen (see point 4 in [[figure>>||anchor="fig_data_source"]]) and is provided in the JS object {{code}}XFC_METADATA.urls.datasource_[csv|json|xml]{{/code}}. |
|
14 |
+{{/info}} |
|
15 |
+ |
|
16 |
+== Creating a data source == |
|
17 |
+ |
|
18 |
+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//. |
|
19 |
+ |
|
20 |
+{{lightbox image="data_source_new_en.png" title="Data sources can be imported or created from scratch."/}} |
|
21 |
+ |
|
22 |
+Every data source needs: |
|
23 |
+ |
|
24 |
+* a unique name (in the settings panel: see point 3 in [[figure>>||anchor="fig_data_source"]]) |
|
25 |
+* the actual data in the editing area (see point 2 in [[figure>>||anchor="fig_data_source"]]) |
|
26 |
+ |
|
27 |
+=== Import of data sources from files === |
|
28 |
+ |
|
29 |
+The following Data types can be used to import data sources: |
|
30 |
+ |
|
31 |
+* **XML**: //.xml// |
|
32 |
+* **CSV**: //.csv//, //.xls//, //.xlsx// (Excel) |
|
33 |
+* **JSON**: //.json// |
|
34 |
+ |
|
35 |
+{{id name="data_source_import_csv"/}} |
|
36 |
+__CSV data sources__ |
|
37 |
+ |
|
38 |
+CSV data sources can be imported from different file types: |
|
39 |
+ |
|
40 |
+* //.csv// |
|
41 |
+Opens up a dialog for configuring the import: |
|
42 |
+** **Delimiter**: Determines which symbol is used in the file for separating data fields/ colunms (typically: comma). |
|
43 |
+** **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). |
|
44 |
+** **Start at line**: Determines where to start importing the data source from. |
|
45 |
+** **Ignore empty lines**: When activated ignores empty lines during import. |
|
46 |
+ |
|
47 |
+{{lightbox image="data_source_import_csv_en.png" title="Import dialog for CSV files"/}} |
|
48 |
+ |
|
49 |
+* //.xls//, //.xlsx// |
|
50 |
+Opens up a dialog for configuring the import: |
|
51 |
+** **Sheets to import**: Determines which worksheets/tables should be imported from the file. |
|
52 |
+ |
|
53 |
+{{lightbox image="data_source_import_excel_en.png" title="Importdialog für Excel-Dateien"/}} |
|
54 |
+ |
|
55 |
+__Drag&Drop__ |
|
56 |
+ |
|
57 |
+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. |
|
58 |
+ |
11 |
11 |
== CSV == |
12 |
12 |
|
13 |
13 |
Here you can insert data sets in the CSV format. |