10.07.2015 Views

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

which group the user is added to. The Sametime Links Toolkit allows you to getthe list of the user’s personal groups. To get the list of groups, you callSTLinksGetPrivateGroups. The result is returned in theSTLinksPrivateGroupsReceived event. After you have the list of personal groups,you can change onAddContact so that it presents a dialog allowing the user tochoose a group from the list of existing ones or enter a new personal groupname.Note: Getting the list of personal groups and adding a user to a personalgroup are the only things you can do with the contact list using the SametimeLinks Toolkits. You will not find other functions in this API for retrieving thecontact list or manipulating it, for example, adding public groups or removingusers. These APIs were not added in order to keep the Sametime Links appletas small as possible. The Sametime Links Toolkit provides the mainfunctionality needed for a client-side application. If you want to retrieve thecontact list or manipulate it in your <strong>Web</strong> application, consider doing it on theserver-side using the Sametime Community Server Toolkit. In a clientapplication, you can use the Sametime Java Toolkit to access the contact list.Getting the e-mail addressThe Send Mail item is actually an HTML mailto link with the e-mail address of theselected person. Where does the address come from? Well, there is no magicway to get it. The e-mail address has to be placed on the page when the page isgenerated. We assume that the application that generates the page puts amapping of names to e-mail addresses in the page. This mapping should includeall the names that have Sametime Links in the page. We implement the mappingwith a JavaScript object in Example 9-15. For example, if Carl Tyler and BethanyKing are Sametime Links in the page, the application that generates the pageadds JavaScript code that maps these names to their e-mail addresses.Example 9-15 Defining the JavaScript object to hold addressesvar emailAddress = new Object();emailAddress["Carl Tyler"] = "ctyler@instant-tech.com";emailAddress["Bethany King"] = "bking@instant-tech.com";The names used in this mapping should be the same as the strings that arepassed in the first parameter of the writeSametimeLink call. The functiongetEmailAddress in Example 9-16 on page 269 is used by showMenu to get thee-mail address of the selected person.268 <strong>Lotus</strong> <strong>Instant</strong> <strong>Messaging</strong>/<strong>Web</strong> <strong>Conferencing</strong> (Sametime): Building Sametime-Enabled Applications

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!