Using scalable and fixed columns in rich:extendedDataTable
thecondor Oct 7, 2010 4:29 PMHello,
I need to format an existing rich:extendedDataTable with character-width-fixed columns. It means, that they should be some columns who show a fixed amount of characters and other than fill the rest of the space. In simple HTML it will be defined on this way. Please use Firefox to test the sample. With IE the widths with 'em' should be increased.
<html>
<head>
<title>Das style-Element</title>
<style type="text/css">
td,th {overflow:hidden;}
.col1 {width: 4em;}
.col2 {width: 8em;}
.col3 {width: *;}
.col4 {width: 5em;}
</style>
</head>
<body>
<div style="width:100%;">
<table border="1" cellpadding="0" cellspacing="0" width="100%" style="table-layout:fixed">
<colgroup>
<col width="4em"/>
<col width="8em"/>
<col width="*"/>
<col width="5em"/>
</colgroup>
<thead>
<tr>
<th class="col1">Spalte 1</th>
<th class="col2">Spalte 2</th>
<th class="col3">Spalte 3</th>
<th class="col4">Spalte 4</th>
</tr>
</thead>
<tbody>
<tr>
<td>1234567890123456789</td>
<td>1234567890123456789</td>
<td>
This is a very long text. This is a very long text. This is a very long text. This is a very long text.
</td>
<td>1234567890123456789</td>
</tr>
<tr>
<td>1234567890123456789</td>
<td>1234567890123456789</td>
<td>
This is a very long text. This is a very long text. This is a very long text. This is a very long text.
</td>
<td>1234567890123456789</td>
</tr>
<tr>
<td>1234567890123456789</td>
<td>1234567890123456789</td>
<td>
This is a very long text. This is a very long text. This is a very long text. This is a very long text.
</td>
<td>1234567890123456789</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
if you see the result (see the two attached pictures), the first, second and fourth column displays in the two different zoom factors (almost) the same amount of characters (8, 16 and 10). The third column fill the rest of the space.
It is possible to define something like this with rich:extendedTable?
Greetings
TC