From version < 16.1 >
edited by nlo
on 09.05.2019, 16:09
To version < 18.1 >
edited by nlo
on 09.05.2019, 16:16
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -39,6 +39,30 @@
39 39  
40 40  The LDAP queries returns a JSON object that can be parsed with {{code language="javascript"}}JSON.parse(...){{/code}}
41 41  
42 +== Testing the query ==
43 +
44 +{{info}}
45 +For quick testing of the query the shortcut {{code}}Ctrl + Enter{{/code}} is provided.
46 +{{/info}}
47 +
48 +LDAP queries can be tested directly from the configuration UI. For this purpose a test console is provided below the editor (see point 6 in [[figure>>||anchor="fig_data_db_query"]]).
49 +In the header of the console there is a row of buttons for controling the query:
50 +
51 +* {{ficon name="database-search"/}}**Perform query**
52 +Runs the LDAP query. If //query parameters// ({{code}}?{{/code}}) are provided the user will be prompted to input values vor those parameters. Otherwise the result of the query will be displayed directly in the //source code view//.
53 +{{lightbox image="data_ldap_query_test_en.png" title="Run the given query"/}}
54 +* {{icon name="question"/}}**Query parameters**
55 +Mask for inputting values for query parameters. This option is only available if query parameters ({{code}}?{{/code}}) are used in the LDAP query. The individual parameters will be enumerated in the query statement. Clicking "User parameters for query" {{ficon name="arrow-right-bold-circle-outline2"/}} executes the query with the given parameters. The result will be displayed in the //source code view//.
56 +{{lightbox image="data_ldap_query_test_param_en.png" title="Query parameters are enumerated"/}}
57 +Actual Query in the editor:
58 +{{lightbox image="data_ldap_query_example.png" title="Example query"/}}
59 +* {{icon name="code"/}}**Source code view**
60 +Query result in JSON format
61 +{{lightbox image="data_ldap_query_test_code_en.png" title="Query result in JSON format"/}}
62 +* {{icon name="Terminal"/}}**Generated LDAP Query**
63 +Displays the generated LDAP statement with input parameter values
64 +{{lightbox image="data_ldap_query_test_gen_en.png" title="Displays the generated LDAP statement with input parameter values"/}}
65 +
42 42  == Examples for LDAP queries ==
43 43  
44 44  The following shows how to retrieve the result of an LDAP query via an HTTP request. [[The demo pages also include an example illustrating how to setup a select element with the result of an LDAP query.>>doc:Examples.SelectOptionsLDAP]]
... ... @@ -57,7 +57,8 @@
57 57  
58 58  Within a form, the following code can be used to perform the LDAP query via an asynchronous HTTP request:
59 59  
60 -{{code language="javascript"}}function ldapQuery(name, queryParameter, delimiter, callback) {
84 +{{code language="javascript"}}
85 +function ldapQuery(name, queryParameter, delimiter, callback) {
61 61   $.ajax({
62 62   url: XFC_METADATA.urls.dataquery_ldap,
63 63   method: 'GET',
... ... @@ -71,5 +71,5 @@
71 71   delimiter: delimiter || ','
72 72   }
73 73   }).success(callback);
74 -}{{/code}}
75 -~{~{/table}}
99 +}
100 +{{/code}}
Copyright 2000-2024