can I base the p:dataTable (primefaces) width on its containing string length?
Problem is: I have resource bundles for internationalisation. Also for the table headers. Basically the row width is based on that table header string (if you do not define else).
But when it comes to strings from resource bundle, sometimes the strings are that short so that sortBy icons overlap the header text!
This is really ugly. But I cannot define a min-size, because then really short translations will result is much space! And long translations again have the problem with overlapping sortBy icon.
SO I’m looking for a workaround like this:
<p:dataTable style="width: <based on header string.length()+5% for the sort icon>" />
how could I do this?
ty
I had a similar problem, and i got it solved with that response:
http://forum.primefaces.org/viewtopic.php?f=3&t=14549