This section of the guide describes specific properties of the iWidget framework in IBM® Lotus® Connections. These properties are simple extensions to the iWidget specification and they are common to the Lotus Connections features that support iWidgets, that is Communities, Home page, and Profiles.
Lotus Connections 2.5 supports three types of widget.
Table 1. Widget types
Mandated widgets are required. This type of widget cannot be removed, hidden, or moved.
Mandated widgets can exist outside of a community or a profile. For example, the Public Communities page or the Search Results page in Profiles can contain this type of widget in addition to a community page or a user profile in Profiles.
Open by default
This type of widget is displayed by default, but it can be removed, hidden, or moved by the owner.
Optional widgets are not displayed by default. This type of widget can be added, removed, hidden, and moved.
In Lotus Connections 2.5, Communities supports all the different widget types, and the owner of a community can customize that community by adding any type of widget. The Home page feature supports optional widgets and widgets that are open by default. A Home page user can customize their home page by adding either of these widget types. Profiles only support mandated widgets.
Obtaining information about the logged in user with “UserProfile”
The userProfile Object is a predefined itemSet that allows you to get information about the authenticated user. Because profiles and communities allow anonymous access, expect the return values to be null when the user is not logged in.
Lotus Connections provides an itemSet to get details about the authenticated user, iContext.getUserProfile(). This returns an immutable itemSet with the following items:
- displayName: the display name of the logged in user
- email: the e-mail address of the logged in user, if available
- userid: the Lotus Connections user ID of the logged in user
The following example retrieves the user ID of an authenticated user:
Persisting widget preferences using managed itemSets
You can persist preferences on a widget basis across sessions by using the attributes managed itemSet. The attributes managed itemSet behaves in the same way as a standard itemSet and provides an additional save() method. This feature is supportes by the Communities and Home page features in Lotus Connections 2.5.
: The save operation invokes an HTTP request to the server, so you should use this function as little as possible. When the widget is removed, the attributes are also removed.
Working with an Ajax Proxy using the IO Module
var myUrl = "http://mycompany.com/test.xml";
var proxiedURL = this.iContext.io.rewriteURI(myUrl);
This feature is not supported in Lotus Connections 2.5, but widget developers can take advantage of the Dojo publish/subscribe API to perform widget-to-widget interactions in a flexible, loosely-coupled manner.
Lotus Connections iWidget Development Guide
iWidget support in the Home page
iWidget support in Profiles and Communities
Best practices for iWidget development
: Vincent Burckhardt and Ronny A Pena