-
1. Re: Wrap header text of HtmlDataTable column
leiras Aug 14, 2008 3:48 PM (in response to leiras)Here is a piece of my code:
<rich:dataTable value="#{telaLogin.contacts}" var="item" width="250px" columnsWidth="50%, 50%"> <rich:column> <f:facet name="header"> <h:outputText value="Name that should be wrapped but, instead, is increasing the table width" /> </f:facet> <h:outputText value="#{item.name}" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="E-mail" /> </f:facet> <h:outputText value="#{item.email}" /> </rich:column> </rich:dataTable>
-
2. Re: Wrap header text of HtmlDataTable column
shadowcreeper Aug 14, 2008 4:29 PM (in response to leiras)Have you tried to use css style="white-space: normal"?
-
3. Re: Wrap header text of HtmlDataTable column
leiras Aug 14, 2008 5:19 PM (in response to leiras)Hi shadowcreeper,
it works on FF, but not in IE.
Any other suggestion? Thanks. -
4. Re: Wrap header text of HtmlDataTable column
leiras Aug 15, 2008 4:04 PM (in response to leiras)I was looking for a solution on the web and seem there is a bug on IE that impossibilite the use of white-space. I sttil have no solution for my problem. Any idea? It do not need to be elegant :) Tahnks.
-
5. Re: Wrap header text of HtmlDataTable column
shadowcreeper Aug 15, 2008 4:08 PM (in response to leiras)Well, you could always add "br" tags...
-
6. Re: Wrap header text of HtmlDataTable column
leiras Aug 15, 2008 6:14 PM (in response to leiras)How? Like this?
<rich:dataTable value="#{telaLogin.contacts}" var="item" width="250px" columnsWidth="50%, 50%" rendered="true"> <rich:column> <f:facet name="header"> <h:outputText value="Name<br>that<br>should<br>be<br>wrapped<br>but, instead, is increasing the table width" /> </f:facet> <h:outputText value="#{item.name}" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="E-mail" /> </f:facet> <h:outputText value="#{item.email}" /> </rich:column> </rich:dataTable>
This is not working... :( The result is the header text "Namethatshouldbewrappedbut, instead, is increasing the table width", not the wrap that I want. What I am doing wrong? -
7. Re: Wrap header text of HtmlDataTable column
leiras Aug 15, 2008 6:17 PM (in response to leiras)Ops, here at the forum it works, but not at my application. In my test the text stays at a unique line.
-
8. Re: Wrap header text of HtmlDataTable column
shadowcreeper Aug 15, 2008 6:19 PM (in response to leiras)maybe use escape="false" ???
maybe "<" instead of "<" ??? -
9. Re: Wrap header text of HtmlDataTable column
shadowcreeper Aug 15, 2008 6:20 PM (in response to leiras)or something like...
<f:verbatim>
</f:verbatim>
<h:output.../>
<f:verbatim>
</f:verbatim> -
10. Re: Wrap header text of HtmlDataTable column
shadowcreeper Aug 15, 2008 6:23 PM (in response to leiras)oops..., there was supposed to be a "pre" and "/pre" tags inside the verbatims...
lousy web software, doesn't allow in-line code and doesn't allow "<" to translate to "<" so no way to show the actual code in-line... :( -
11. Re: Wrap header text of HtmlDataTable column
leiras Aug 15, 2008 6:30 PM (in response to leiras)It works with escape="false"! Thaks a lot shadowcreeper!
-
12. Re: Wrap header text of HtmlDataTable column
jazir1979 Aug 16, 2008 9:24 AM (in response to leiras)white-space in CSS does work for me, but not when i have sortable columns, due to the way that the sorting arrow image is rendered.
it's very frustrating that column widths are not respected.