Wt examples  3.3.6
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:
Inheritance graph
[legend]

Public Member Functions

 ContactSuggestions (WObject *parent=0)
 Create a new ContactSuggestions popup. More...
 
void setAddressBook (const std::vector< Contact > &contacts)
 Set the address book. More...
 

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 ( WObject *  parent = 0)

Create a new ContactSuggestions popup.

Definition at line 26 of file ContactSuggestions.C.

27  : WSuggestionPopup(WSuggestionPopup::generateMatcherJS(contactOptions),
28  WSuggestionPopup::generateReplacerJS(contactOptions),
29  parent)
30 { }

Member Function Documentation

§ setAddressBook()

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

Set the address book.

Definition at line 32 of file ContactSuggestions.C.

33 {
34  clearSuggestions();
35 
36  for (unsigned i = 0; i < contacts.size(); ++i)
37  addSuggestion(contacts[i].formatted(), contacts[i].formatted());
38 }

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

Generated on Thu Jan 12 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.12