+ // Set the URL and Service
+ rpc.setUrl("/services/");
+ rpc.setServiceName("samba.ldb");
+ rpc.setCrossDomain(false);
+
+ find.setEnabled(false);
+// abort.setEnabled(true);
+ mycall = rpc.callAsync(function(result, ex, id)
+ {
+ mycall = null;
+ if (ex == null)
+ {
+ var rowData = [];
+ for (var i = 0; i < result.length; i++)
+ {
+ var o = result[i];
+ if (typeof(o) != "object")
+ {
+ alert("Found unexpected result, type " +
+ typeof(o) +
+ ", " +
+ o +
+ "\n");
+ continue;
+ }
+ for (var field in o)
+ {
+ // skip dn and distinguishedName fields;
+ // they're shown in each row anyway.
+ if (field == "dn" || field == "distinguishedName")
+ {
+ continue;
+ }
+ rowData.push( [
+ o["dn"],
+ field,
+ o[field]
+ ] );
+ }
+
+ // Tell the table to use the new data
+ tableModel.setData(rowData);
+ }
+ }
+ else
+ {
+ alert("Async(" + id + ") exception: " + ex);
+ }
+ find.setEnabled(true);
+// abort.setEnabled(false);
+ },
+ "search", // method
+ db_handle, // database handle
+ search.getValue(), // search expression
+ "", // baseDN
+ "default", // scope
+ [ "*" ]); // attributes
+ });
+
+ // Add the button to horizontal layout
+ layout.add(find);
+
+ // Add the horizontal box layout to the page
+ page.add(layout);
+
+ // Create a simple table model
+ var tableModel = new qx.ui.table.SimpleTableModel();
+ tableModel.setColumns([ "Distinguished Name", "Attribute", "Value" ]);
+