Quantcast
Channel: XPages – Xcellerant
Viewing all articles
Browse latest Browse all 216

XPages Data Views – Part 4: Icon Columns

$
0
0

The Data View control layout includes a placeholder for an icon column. In this post, I’ll show how to use this feature and dynamically detemine the icon to display.

Data View Series

Example

This screen shot shows an example that was demonstrated in the first NotesIn9 video on the Data View control that I recorded

DataView_4_A

Icon Column

The icon column in the data view does display icon columns from an underlying Notes client view. Instead, you provide a list of available icons and specify the value from an underlying column that would cause the icon to be displayed.

Icon columns are defined under All Properties > format > iconColumn.

1) Define the columnName from the underlying view that will provide data.

2) Click the plus (+) icon in the icons property to add an icon and define the url path to the icon. If you click into the url field, you will see a folder icon that will provide a list of images in the current database to choose from.

3) Define the selectedValue property. When the data in the underlying column matches the selectedValue property, the icon will be displayed.

DataView_4_B

In this example, the column from the underlying view is named $2. The first icon is set to be displayed if the column value is 1. The second icon is defined to be displayed when the underlying view column is 2, and so on.

Another option that you have is to compute the URL for the icon to display.

A third option that you have is to set the selected property of the icon and compute a value that returns true or false, based on whether you want to display the icon.

Up Next

In the next post, I’ll show how to use the Pager Add Rows control to provide a more modern method of view navigation than a pager.



Viewing all articles
Browse latest Browse all 216

Trending Articles