IBM Business Monitor, V8.0.1 > Reference > Developing for Monitor dashboard spaces > Overview of widgets
Widget attribute layers
IBM Business Monitor uses layers of attributes to provide superusers, editors, and users with the ability to customize what information a widget displays along with how the widget displays that information.
There are four layers of widget attributes that can define the look of a widget and how that widget displays its information. Each layer is part of a hierarchy, starting with all instances of a widget and progressing down to a particular instance of a widget for a specific user. Each layer represents an opportunity to configure and personalize a particular widget, with the lower levels overriding the values of the higher levels.
The four customization layers are:
- Definition. The attribute values in this layer serve as default values for all instances of the widget. Widget developers define the values in the iWidget definition for the widget.
For example, the definition for the MyCompanyFeed widget has a feed attribute that is set to the New Product feed from MyCompany.com. Every page editor who adds an instance of the MyCompanyFeed widget to a page sees the New Product feed by default.
- Administration. The attribute values in this layer also serve as default values for all instances of the widget but these values can be set at run time. A superuser can set the attributes when the widget is in config mode.
For example, if a superuser wants to change the MyCompanyFeed widget to display the News feed instead of the New Product feed, he or she selects Configure in the widget menu, which puts the instance of the MyCompanyFeed widget into config mode. The superuser then changes the Feed field and saves the change. Instead of seeing the New Product feed, users now see the News feed. Page editors, when they now add the new instance of the MyCompanyFeed widget to a page, also see the News feed in the new instance.
- Instance. The attribute values in this layer apply to the particular instance of the widget. A page owner or editor can set the attributes when the widget is in edit mode.
For example, if a page editor wants to change the feed for a particular instance of the MyCompanyFeed widget, he or she selects Edit Settings in the widget menu and then changes the value in the Feed field. After the page editor saves the change, the MyCompanyFeed widget displays the new feed. This change does not affect any other MyCompanyFeed widget instances in this business space or any other business space.
- User. The attribute values in this layer apply to a particular instance of the widget to personalize it for the current user. Users set these attributes when the widget is in personalize mode or in view mode. When the widget is in personalize mode, the users explicitly select Personalize from the widget menu and change values in the window that opens.
For example, the MyCompanyFeed widget displays headlines only or headlines along with the first two sentences. The second choice is the default. If a user wants to change this widget to display headlines only, he or she explicitly sets values by clicking Personalize and then selecting the check box that removes the sentences from the feed. This particular MyCompanyFeed widget now displays only headlines.
If the user closes the page and then reopens it, the MyCompanyFeed widget continues to display only headlines. If a different user opens the page, the same MyCompanyFeed widget displays the headlines and the first two sentences.
When the widget is in view mode and the widget supports personalizing attributes in this mode, users implicitly set attributes by selections in the user interface of the widget.
For example, a widget has a table with multiple columns. One of the columns is the default for sorting the data. If a user wants to use a different column for sorting. he or she selects the header for that column, which changes the attribute that determines which column the widget uses for sorting. Again, if the user closes the page and then reopens it, the widget uses the selected column to sort instead of the default column. A different user who views the widget will see the table sorted by the default column.
Not every widget has all four layers of customization. Some widgets might not have the instance layer or the user layer or they might be disabled for certain types of users such as viewers or editors. For information about the config, edit, and personalize modes, see the
The following diagram shows the layers of customization for a Stock Tracker widget. It has four attributes: refresh, title, stocks, and alert. The layers set values for these attributes and the results show how the lower layers override the upper layers to personalize the widget for a particular user.
Although values at the lower personalization layers override values at the higher personalizations, they do not replace the values at the higher levels. If a widget has a height of 80 pixels, which the superuser sets at the administration level, and a user changes its height to 70 pixels (at the user level), another user sees the widget with a height of 80 pixels. Additionally, if the superuser then changes the height to 60 pixels, the first user continues to see the widget with a height of 70 pixels because the value at the user level overrides the value at the administration level. However, the second user sees the widget at its new height of 60 pixels because the second user has not personalized the widget and it is getting its height value from the administration level, which changed.
If you are a superuser, try to set attributes at the administration level before making the widget generally available. Once generally available, users might edit settings or personalize the widget and the attributes they change do not pick up changes you subsequently make at the configuration level.
Related tasks:
Supporting widget customization and personalization
Create widgets using basic tools
Create widgets using Rational Application Developer