| LDAPBeans |
Building the LDAPBeans |
There are several LDAPBeans in the netscape/ldap/beans directory. These can all be built using similar methods -- in this example, TableQuery will be used.
TableQuery is built using the BuildTableQuery script (either
BuildTableQuery.sh
or BuildTableQuery.bat
depending on your platform). This script compiles the necessary
classes and uses a manifest file to specify which class is the JavaBean:
TableQuery.mf
Manifest-Version: 1.0 Name: netscape/ldap/beans/LDAPTableQuery.class Java-Bean: True
The TableQuery Bean has an associated BeanInfo class which is used
to specify the events that the TableQuery bean can fire. TableQuery
is an invisible bean, and although it will appear during design time,
it will not appear at runtime. The TableQuery.jar
that is generated
can be imported directly into any tool that supports JavaBeans (like
like the BeanBox or Visual JavaScript).
The BeanInfo for TableQuery relies predominantly on introspection, and is used to publish the TableChange and RowChange events. These events make it possible for the TableQuery bean to communicate the results of an LDAP query directly to a component that can listen to Table/Row events (like the CoffeeTable component found on the Visual JavaScript palette).
To create a simple Web Application using the TableQuery component, follow these steps:
CDKINSTALL/samples/LDAPBeans
.
90%
Now begin wiring the components together:
"cn="+this.value
Now all that is left to do is to double-click on the LDAPTableQuery component and set its properties in a manner appropriate for your network.Contact your systems administrator for details, or take a peek at the sample values in the screen snapshot of the running sample shown below:
Important Note: When you are done setting the parameters for the TableQuery component, deploy the application to your webserver to see your results. Previewing LDAP-based Web Applications is not supported in this release, using Preview may cause your browser to become uncommunicative for unusually long periods of time.
Congratulations! You've just built your first LDAP-enabled Web Application!