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 , which does not automatically do all the unknown attributes to the actual HTML attributes, but at least, the standard JSF RI / Mojorra, probably not?).

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 columns & gt; Will be applied to .

  & 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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -