... |
... |
@@ -33,21
+33,18 @@ |
33 |
33 |
|projektId|The ID of the form. The form ID can be accessed via the JavaScript object {{code}}window.XFC_METADATA.currentProject.id{{/code}}.|Yes, when //mandantName// was not specified. |
34 |
34 |
|queryParameter|When the LDAP query contains placeholders (question marks, {{code}}?{{/code}}), a list of parameters must be supplied for each placeholder. The items are separated with the delimiter as defined by the URL parameter //delimiter//.|No |
35 |
35 |
|delimiter|The delimiter for the placeholder values, see //queryParameter//. Defaults to a comma {{code}},{{/code}}|No |
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}}. |
|
37 |
+When you want to initiate an LDAP query from a form via JavaScript, use the URL provided by the JavaScript object [[window.XFC_METADATA>>Main.Formular-Metadaten.WebHome]]. 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 |
|
42 |
42 |
== Examples for LDAP queries == |
43 |
43 |
|
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]] |
|
43 |
+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:AuswahlLDAP]] |
45 |
45 |
|
46 |
46 |
Assuming an LDAP query has been created already and was named //MyQuery//. |
47 |
47 |
|
48 |
|
-{{code}} |
49 |
|
-((distinguishedName=?,?) |
50 |
|
-{{/code}} |
|
47 |
+{{code}}((distinguishedName=?,?){{/code}} |
51 |
51 |
|
52 |
52 |
You need to provide two values for the the two placeholders (question marks). Send a GET request to the following URL to perform the LDAP query: |
53 |
53 |
|
... |
... |
@@ -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) { |
|
57 |
+{{code language="javascript"}} |
|
58 |
+function ldapQuery(name, queryParameter, delimiter, callback) { |
61 |
61 |
$.ajax({ |
62 |
62 |
url: XFC_METADATA.urls.dataquery_ldap, |
63 |
63 |
method: 'GET', |
... |
... |
@@ -71,5
+71,6 @@ |
71 |
71 |
delimiter: delimiter || ',' |
72 |
72 |
} |
73 |
73 |
}).success(callback); |
74 |
|
-}{{/code}} |
75 |
|
-~{~{/table}} |
|
72 |
+} |
|
73 |
+{{/code}} |
|
74 |
+{{/table}} |