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.

Using the person tag eliminates the need to worry about logging in to theSametime server and providing the server with authentication information. Thetag does everything for you with only minor changes to the code.10.3.6 Adding more Sametime functionalityUntil now, it was very easy and simple to add awareness and chat to your portlet.But what if you want to do more? For example, what if you would like to changeyour status directly from within the portlet? How can we do it? The person tag willalone will not be sufficient to help us in this case.As we will demonstrate in the next section, this is also a relatively easy functionto build in. All you need to do is use any of the STLinks API calls, which are madeavailable to you, since you included the people tag library (people.tld) and thecollaboration services classes (cs.jar file) in Example 10-1 on page 287. It isactually the case that the person tag is already using the Sametime STLinks API,so all of what you need is already included. You only need to add your specificcalls.Adding an I’m Away button to our portletWithin this next example, we will demonstrate how to change your online statusdirectly from within the portlet. We will add the ability to change the status fromactive to away, and also provide the ability to directly edit the away messageassociated with the status. The end result will provide a button and editable textfield similar to the one shown in Figure 10-9 on page 290.Chapter 10. Sametime-enabling portlets 289

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

Saved successfully!

Ooh no, something went wrong!