Set maximum height of the row or cell in the DataTable

UI Components for JSF
Post Reply
JavaFlint
Posts: 13
Joined: 21 May 2015, 18:56

25 Nov 2015, 20:11

Hello,
I'm in process of converting application from RichFaces 3.3 to PrimeFaces 5 and having hard time making p:dataTable looks and behave like rich:scrollableDataTable.

Is it possible to set maximum height of the cell (or row) in the scrollable p:datatable?
Currently it's always expands to the show all content, but I'd like to show only two lines in the cell.
Also, how to make the row height the same in the fixed and scrollable parts of the table?

I'm using these styles, but they only work if I set maximum height:

.recvTable thead tr th {
height : 40px;
}
.recvTable .ui-datatable-scrollable-theadclone tr {
height : 0px;
}
.recvTable tbody tr {
height : 25px;
max-height: 25px;
overflow: hidden;
}

Browser - IE11, Edge mode.

Thank you,
PrimeFaces 5.3 community, JBoss EAP6.3, JSF 2.1, JDK 1.7, IE11

JavaFlint
Posts: 13
Joined: 21 May 2015, 18:56

04 Dec 2015, 17:51

Looks like row height cannot be set in PrimeFaces' dataTable because it is rendered as HTML table where each cell's content not wrapped into the <div> element, which would allow to set the cell's height.

BTW, cells in the extendedTataTable from RichFaces were wrapped with <DIV> .
PrimeFaces 5.3 community, JBoss EAP6.3, JSF 2.1, JDK 1.7, IE11

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests