Wt examples  4.10.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ContactSuggestions Class Reference

A suggestion popup suggesting contacts from an addressbook. More...

#include <ContactSuggestions.h>

Inheritance diagram for ContactSuggestions:
[legend]

Public Member Functions

 ContactSuggestions ()
 Create a new ContactSuggestions popup.
 
void setAddressBook (const std::vector< Contact > &contacts)
 Set the address book.
 

Detailed Description

A suggestion popup suggesting contacts from an addressbook.

This popup provides suggestions from a list of contact, by matching parts of the name or email adress with the current value being edited. It also supports editing a list of email addresses.

The popup is only available when JavaScript is available, and is implemented entirely on the client-side.

Definition at line 32 of file ContactSuggestions.h.

Constructor & Destructor Documentation

◆ ContactSuggestions()

ContactSuggestions::ContactSuggestions ( )

Create a new ContactSuggestions popup.

Definition at line 26 of file ContactSuggestions.C.

27 : WSuggestionPopup(WSuggestionPopup::generateMatcherJS(contactOptions),
28 WSuggestionPopup::generateReplacerJS(contactOptions))
29{ }
Wt::Auth::Dbo::UserDatabase< AuthInfo > UserDatabase
Definition Session.h:22

Member Function Documentation

◆ setAddressBook()

void ContactSuggestions::setAddressBook ( const std::vector< Contact > & contacts)

Set the address book.

Definition at line 31 of file ContactSuggestions.C.

32{
34
35 for(auto contact : contacts)
36 addSuggestion(contact.formatted(), contact.formatted());
37}

The documentation for this class was generated from the following files: