From version < 17.1 >
edited by nlo
on 09.05.2019, 16:11
To version < 18.2 >
edited by awa
on 11.02.2020, 09:23
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.nlo
1 +XWiki.awa
Content
... ... @@ -8,6 +8,12 @@
8 8  {{id name="fig_data_ldap_query"/}}
9 9  {{figure image="data_ldap_query_en.png"}}Configuration screen for creating LDAP queries: (1) list of existing LDAP queries, (2) editor for defining the query, (3) settings panel of the query, (4) attribute filters for the query, (5) Generated servlet URL for using the LDAP query, (6) console for testing the query{{/figure}}
10 10  
11 +
12 +{{html wiki="true"}}
13 +<div class='xm-figure xm-float-right xm-clear-h2' data-alt='Configuration screen for creating LDAP queries: (1) list of existing LDAP queries, (2) editor for defining the query, (3) settings panel of the query, (4) attribute filters for the query, (5) Generated servlet URL for using the LDAP query, (6) console for testing the query'><div class='xm-figure-inner' style='width:310px'>{{lightbox image='data_ldap_query_en.png' width='300' group='$height' group='$group' title='Configuration screen for creating LDAP queries: (1) list of existing LDAP queries, (2) editor for defining the query, (3) settings panel of the query, (4) attribute filters for the query, (5) Generated servlet URL for using the LDAP query, (6) console for testing the query'/}}<div class='xm-figure-caption'>Configuration screen for creating LDAP queries: (1) list of existing LDAP queries, (2) editor for defining the query, (3) settings panel of the query, (4) attribute filters for the query, (5) Generated servlet URL for using the LDAP query, (6) console for testing the query</div></div></div>
14 +{{/html}}
15 +
16 +
11 11  * Open the module "LDAP queries" and click "New" {{ficon name="plus-circle-outline"/}} in the header of the list (see point 1 in [[figure>>||anchor="fig_data_ldap_query"]]).
12 12  * Provide a name for the LDAP query, and optionally a description.
13 13  * Select the LDAP connection to use; either [[client>>doc:Formcycle.UserInterface.Client.WebHome]]'s LDAP connection or another custom [[LDAP connection>>doc:LDAPConnections]].
... ... @@ -35,10 +35,30 @@
35 35  |delimiter|The delimiter for the placeholder values, see //queryParameter//. Defaults to a comma {{code}},{{/code}}|No
36 36  {{/table}}
37 37  
38 -When you want to initiate an LDAP query from a form via JavaScript, use the URL provided by the JavaScript object [[window.XFC_METADATA>>https://jsdocs.formcycle.eu/jsdocs/de/modules/_formcycle_v6_de_d_.html#xfc_metadata]]. The LDAP query URL can be accessed via {{code language="javascript"}}window.XFC_METADATA.urls.datasource_ldap{{/code}}.
44 +When you want to initiate an LDAP query from a form via JavaScript, use the URL provided by the JavaScript object {{jsdoc page="metadata" name="urls"}}XFC_METADATA.urls{{/jsdoc}}. The LDAP query URL can be accessed via {{code language="javascript"}}window.XFC_METADATA.urls.datasource_ldap{{/code}}.
39 39  
40 40  The LDAP queries returns a JSON object that can be parsed with {{code language="javascript"}}JSON.parse(...){{/code}}
41 41  
48 +== Testing the query ==
49 +
50 +{{info}}
51 +For quick testing of the query the shortcut {{code}}Ctrl + Enter{{/code}} is provided.
52 +{{/info}}
53 +
54 +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"]]).
55 +In the header of the console there is a row of buttons for controling the query:
56 +
57 +* {{ficon name="database-search"/}}**Perform query**
58 +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//.{{lightbox image="data_ldap_query_test_en.png" title="Run the given query"/}}
59 +* {{icon name="question"/}}**Query parameters**
60 +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//.
61 + {{lightbox image="data_ldap_query_test_param_en.png" title="Query parameters are enumerated"/}}
62 +Actual Query in the editor:{{lightbox image="data_ldap_query_example.png" title="Example query"/}}
63 +* {{icon name="code"/}}**Source code view**
64 +Query result in JSON format{{lightbox image="data_ldap_query_test_code_en.png" title="Query result in JSON format"/}}
65 +* {{icon name="Terminal"/}}**Generated LDAP Query**
66 +Displays the generated LDAP statement with input parameter values{{lightbox image="data_ldap_query_test_gen_en.png" title="Displays the generated LDAP statement with input parameter values"/}}
67 +
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]]
Copyright 2000-2024