... |
... |
@@ -33,18
+33,21 @@ |
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}} |
36 |
36 |
|
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}}. |
|
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}}. |
38 |
38 |
|
39 |
39 |
The LDAP queries returns a JSON object that can be parsed with {{code language="javascript"}}JSON.parse(...){{/code}} |
40 |
40 |
|
41 |
41 |
== Examples for LDAP queries == |
42 |
42 |
|
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]] |
|
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]] |
44 |
44 |
|
45 |
45 |
Assuming an LDAP query has been created already and was named //MyQuery//. |
46 |
46 |
|
47 |
|
-{{code}}((distinguishedName=?,?){{/code}} |
|
48 |
+{{code}} |
|
49 |
+((distinguishedName=?,?) |
|
50 |
+{{/code}} |
48 |
48 |
|
49 |
49 |
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: |
50 |
50 |
|
... |
... |
@@ -54,8
+54,7 @@ |
54 |
54 |
|
55 |
55 |
Within a form, the following code can be used to perform the LDAP query via an asynchronous HTTP request: |
56 |
56 |
|
57 |
|
-{{code language="javascript"}} |
58 |
|
-function ldapQuery(name, queryParameter, delimiter, callback) { |
|
60 |
+{{code language="javascript"}}function ldapQuery(name, queryParameter, delimiter, callback) { |
59 |
59 |
$.ajax({ |
60 |
60 |
url: XFC_METADATA.urls.dataquery_ldap, |
61 |
61 |
method: 'GET', |
... |
... |
@@ -69,6
+69,5 @@ |
69 |
69 |
delimiter: delimiter || ',' |
70 |
70 |
} |
71 |
71 |
}).success(callback); |
72 |
|
-} |
73 |
|
-{{/code}} |
74 |
|
-{{/table}} |
|
74 |
+}{{/code}} |
|
75 |
+~{~{/table}} |