How do i display a ‘No Data Found’ message inside a h:dataTable or a rich:dataTable. The header of the table should show the fields say Name, Roll Number and Class; The UI should show the header and a no data found message in the data section of the h:dataTable
Thanks.
That’s not possible with
h:dataTableorrich:dataTable. The PrimeFacesp:dataTablehas anemptyMessageattribute which does exactly that.Your best bet is to put a message below the table which is rendered when the table is empty. You could use CSS to give it the same style as the table so that it look like part of the table.