The Allow zero rows in repeat controls
setting in XSP Properties can be used to cause a Repeat control not to display any rows, giving you the ability to compute the row count as desired, even when there is data that would otherwise have been displayed. In this post, I’ll show how to update the setting and describe its effect.
XSP Properties
In Notes 9, you can find the XSP properties under Application Configuration in the Applications view of Domino Designer.
This UI gives you a nicer front end to modify a number of values in the xsp.properties file, which contains a lot of configuration information for the application.
There are 4 tabs, 3 of which contain several properties that you can modify and the fourth tab which displays the full source of the properties file.
There are many, many properties that can be set in the file, but there are only a few specified by default. The rest are treated as default values when not otherwise specified.
As you change properties in the UI, they will be added to the source.
Allow zero rows in repeat controls
The Allow zero rows in repeat controls
setting on the Page Generation
tab is not selected (i.e. false) by default.
The effect is that if you have a Repeat control where the rows property is computed to 0, it will revert to the default row count of 30.
If you select that option, it adds this line to xsp.properties:
xsp.repeat.allowZeroRowsPerPage=true
With this setting, you can compute a Repeat control’s row
count to 0 and it will not show any rows. This effectively hides it from the UI, but still loads the repeat control into the JSF component tree so it can be modified programmatically, if necessary.
Applicability
The XPages Portable Command Guide says that this property applies to View Panel, Data Table, and Repeat controls.
It works as expected with a Repeat control, but did not work properly with a View Panel in my testing (with Notes 9).
With the property set to false, a View Panel with the rows property set to 0 would show 30 rows. With the property set to true, the View Panel throws a divide by zero
error.
