« Back to home

Passing document data objects to XPages custom controls

Perhaps unfortunately, custom controls inherit the scope and variables of the XPages they are placed on. The upside of this is that you can bind data to document1 on an XPage, and then refer to document1 in custom controls on that XPage. The downside is that if you define a variable in an XPage (such as a data source), and then define it in the custom control as well, the two will clash.…

Read more »

Applying individual CSS styles to TH elements in XPages

The problem: You need to apply different CSS style values to different table header elements in a table, and you’re producing the table using XPages. You might initially think that you can use the xp:viewColumnHeader styleClass property. If you try it, with something like this: <xp:viewColumn columnName="Field1" id="viewColumn1"> <xp:viewColumnHeader value="Field 1" id="viewColumnHeader1" styleClass="one"/> </xp:viewColumn> <xp:viewColumn columnName="Field2" id="viewColumn2"> <xp:viewColumnHeader value="Field 2" id="viewColumnHeader2" styleClass="two"/> </xp:viewColumn> …then you’ll find that you get output like this:…

Read more »