-2

Can someone explain the default behavior of the columns? The data in my columns will vary, so I am wondering

  1. do they evenly distribute,

  2. do they give larger column to the larger data, smaller to the smaller ...

  3. is there a minimum width it give to the header,

  4. when does it determine it is going to word wrap? are there times that it will not word wrap and just make the length so wide that you need to manually control the width?

  5. My research tells me the best way to control is via CSS?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Kairan
  • 5,342
  • 27
  • 65
  • 104

1 Answers1

2

JSF h:dataTable generates a plain html <table> so it will basically reacts like an html <table>. You can refer to this answer if you want to know more about default column width.

Anyhow, here is how it is going to react according to your questions :

  1. It will not evenly distribute.
  2. Larger data will given more column width.
  3. A minimum header width is not required.
  4. It will word wrap when there is no more available width but it will not break words.

Also CSS is not only the best way to control the table appearance but the only recommended way.

Community
  • 1
  • 1
ForguesR
  • 3,558
  • 1
  • 17
  • 39