NAME
Gtk2::Net::LDAP::Widgets::LdapEntryView - LDAP entry viewport
SYNOPSIS
use Gtk2::Net::LDAP::Widgets;
$treeView = Gtk2::Net::LDAP::Widgets::LdapTreeView->new($ldap_source, 'ou=OrgStructure,dc=example,dc=com', 'objectClass=top');
# expand entries two tree levels below:
$treeView->expand_row(Gtk2::TreePath->new_from_string('0'), 0);
$treeView->expand_row(Gtk2::TreePath->new_from_string('0:0'), 0);
# ... later ...
print join(", ", $treeView->get_dn);
=head1 ABSTRACT
Gtk2::Net::LDAP::Widgets::LdapEntryView is a child class to Gtk2::TreeView and is used to create a Gtk2 component which lets the user select LDAP entry/entries displayed in a tree-like structure.
Note: there might be problems with displaying the tree when an interactive filter is set since there may be problems building the tree if all ancestors for an entry aren't included in the search result.
So it's advised to carefully control the filters that are fed to this component.
CONSTRUCTOR
- new ( ldap_source, base_dn, static_filter, interative_filter, single_selection)
-
Creates a new Gtk2::Net::LDAP::Widgets::LdapTreeView object.
ldap_sourcethe Net::LDAP object which is an active connection to an LDAP serverbase_dnthe base DN of LDAP search operationsstatic_filterthe static filter that will be logically AND-ed with all filters executed by this selectorinteractive_filterthe additional filter that usually comes from filter box componentssingle_selectionwhether to use single selection mode (otherwise multiple selection is posible)
refresh_model
Refresh the data model - re-execute the search with the current filters
get_dn
Return the list of selected entries' Distinguished Names.
The list has at most one entry if single_selection is set to 1.
set_dn
- set_dn( dn_list )
-
Sets the state of entries specified by DNs in dn_list to "selected" and unselects all other entries.
dn_listlist of Distinguished Names of entries to select
set_interactive_filter
- set_interactive_filter ( interactive_filter )
-
Sets the interactive filter which is an additional filter applied to LDAP searches, usually provided by interactive components like a search/filter box and refreshes the data model, re-executing LDAP search and building a new data tree.
interactive_filtera string representation of an LDAP filter
SEE ALSO
Gtk2::Net::LDAP::Widgets Gtk2 Net::LDAP
AUTHOR
Aleksander Adamowski, <cpan@olo.org.pl>
COPYRIGHT AND LICENSE
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.