Gtk2::Net::LDAP::Widgets::LdapEntrySelector - LDAP entry selection window
use Gtk2::Net::LDAP::Widgets; my $entryPopup = Gtk2::Net::LDAP::Widgets::LdapEntrySelector->new ($parent_window, $ldap_source, 'dc=example,dc=com', 'objectClass=inetorgperson', 'init_interactive_filter' => 'smith', 'single_selection' => 1, 'interactive_filter_type' => 'simple' ); $entryPopup->signal_connect (response => sub { my ($popup, $response) = @_; if($response =~ 'accept') { print "Selected entry DN: ".$entryPopup->get_dn; } else { print "No existing entry selected.\n"; } $_[0]->destroy; }); $entryPopup->show_all;
Gtk2::Net::LDAP::Widgets::LdapEntrySelector is a child class to Gtk2::Dialog and is used to create a Gtk2 dialog which lets the user search for a LDAP entry and select it.
The dialog is equipped with a search/filter box.
Creates a new Gtk2::Net::LDAP::Widgets::LdapEntrySelector object.
parent the Gtk2::Window which will be parent of this Gtk2::Dialog
parent
ldap_source the Net::LDAP object which is an active connection to an LDAP server
ldap_source
base_dn the base DN of LDAP search operations
base_dn
static_filter the static filter that will be logically AND-ed with all filters executed by this selector
static_filter
The string to be initially put in the filter box
Whether to use single selection mode (otherwise multiple selection is posible)
The type of filter box: 'ldap' supports full LDAP filter syntax, 'simple' does a substring search against the "cn" attribute, 'none' disables the search/filter box.
Refresh the entries list - re-execute the search with the filter determined by the search/filter box.
Return the list of selected entries' Distinguished Names.
The list has at most one entry if single_selection is set to 1.
Gtk2::Net::LDAP::Widgets Gtk2 Net::LDAP
Aleksander Adamowski, <cpan@olo.org.pl>
Copyright 2005,2008 by Aleksander Adamowski
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Gtk2::Net::LDAP::Widgets, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gtk2::Net::LDAP::Widgets
CPAN shell
perl -MCPAN -e shell install Gtk2::Net::LDAP::Widgets
For more information on module installation, please visit the detailed CPAN module installation guide.