torsdag, juni 21, 2007

Hiding the Header for the Selection Facet

A question that I have seen on a few occasions is how you can hide the "Select" heading in the table when using the selection facet. Here is a solution for that problem that is based on this entry: in Frank Nimphius blog. Please note that, as Frank writes, that "Note that the CSS uses translateable text (or here translateable component names) to identify the component, which makes this solution weak.".

You can hide the 'Select' text by setting the text size to 0 for the concerned table header style (using display:none will not work, as it will cause the table headers to display over the incorrect column).

Here is the Table as default:

The "Select" (or in Swedish "Välj") header is controlled by this style (th.x2z) element (see page source):

<th scope="col" width="1%" nowrap class="x2z">Välj</th>

Now you can alter the af:tableSelectMany by changing the code in the page to:

<f:facet name="selection">

<af:tableSelectMany text="Test">


<style type="text/css">

th.x2z{font-size: 0};





This will result in the following table:

Now the "Select" (or "Välj") test is set to 0 size, thus will not be displayed.

Inga kommentarer:

Skicka en kommentar