How to set the width for the dataTable rendered column in JSF? -
I tried this way, but I could not do that. With the rendered HTML, I do not see a width attribute for headers or for datable rows. I'm using JSF 1.2 without any component Libs. What can be the problem?
I do not understand this link answer honestly. & lt; H: column & gt;
Because it is in the default JSF implementation support, on all those features. It is very far for me why it is given 6 votes and accepted is marked, it will be ignorance or coincidence (Probably both the questioner and the answer are using a JSF implementation I do not know who has
He said, to style the columns separately, the attribute of the column class
, you accept this command level of the CSS class names, which later Lt; Td>
generated by elemenes
.
& lt; H: datatable column classes = "column1, column2, column3" & gt; & Lt; H: column & gt; ... & lt; / H: column & gt; & Lt; H: column & gt; ... & lt; / H: column & gt; & Lt; H: column & gt; ... & lt; / H: column & gt; & Lt; / H: datatable & gt;
This will end something like this:
& lt; Table & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; Td square = "column1" & gt; ... & lt; / Td> & Lt; Td square = "column2" & gt; ... & lt; / Td> & Lt; Td square = "column 3" & gt; ... & lt; / Td> & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt;
To specify the width, simply apply CSS accordingly.
.column1 {width: 200px; } .column2 {width: 100px; } .column3 {width: 50px; }
Comments
Post a Comment