Try OpenEdge Now
skip to main content
BPM Events User's Guide
Persistent structures : Infopads : Creating infopads : Associating labels with infopads
 
Associating labels with infopads
Infopads can have their dimensions labeled. These labels can identify the cells instead of numerical indices that indicate row and column (for example, [10][4]). The labeling action-item uses the functions addRowLabels() or addColLabels(). For example, a table with one entry per day of the week may be labeled after the names of the day.
initialize {
dailyStats := new persistent infopad<cell{avg_resp_time:int,
avg_req_size:int, max_req_size:int}>[7][24]("dailyStats");
dailyStats.addRowLabels("DAYS OF WEEK", list {"Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday", "Sunday"});
dailyStats.addColTitle("HOURS");
}
The row labels are specified with the function addRowLabels(). The first argument (here, "DAYS OF WEEK") is a dimension title, qualifying all the remaining labels. When no labels other than the title are specified, you can use either addColTitle(<title>) or addRowTitle(<title>). Columns and rows are defined similarly, with the list of labels assigned one by one to each column or row of the table, starting with column or row 1 by default.
It is possible to change or set the label of a single row or column, using:
dailyStats.setRowLabel(2, "Day2");
dailyStats.setColLabel(1, "morning");