XPages: Hide Detail Rows
Steve Castledine 16 February 2010 14:41:42
Very quiet around here as very busy (some very cool stuff) and still catching up on "I will document that for you" from Lotusphere. So here's one off that list "Hide Detail Rows".So in Notes development we have the ability to add numeric values to columns and add totals. Often we are not interested in the number per row but just the totals, maybe by category:
So we set the view column property "Hide Detail Rows" to achieve this:
When we want to do the same for XPages, this particular property is not carried forward and so when creating a default view we get:
So the first thing we need to do for this example is to make it a whole number. To do this we navigate to the column properties and section "data" and set display type to Number, and format as Decimal, Integer only.
We then need to hide the detail rows, but before that we need to assign a "name" to our row data so we can reference it. We do this in the view panel properties under data and "var" (set to "rowData" below).
We then change our totals column to display a computed value. Our computed value would then detect whether we are a category or document row (using isCategory()) and display a value accordingly:
if(rowData.isCategory()){return rowData.getColumnValue("$2")}
- Comments [6]
