« Back to home

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 »

Form design: You're doing it wrong

One of the most valuable qualities for a software developer is an ability to recognize and admit when they have been doing something wrong. Yesterday I discovered an excellent summary of HCI research regarding online form design, and discovered that I’ve been designing forms incorrectly for years. In summary, the best way to lay out a form is with labels above the fields, left-aligned. The labels should be in smaller regular text, not bold.…

Read more »