Hi, i use dataTable for looping a list of search results.
when the size of the result is 0, i want it to show a mesg "No record found" and at the same time i want the column header to be shown. How do i do that?
this is my dataTable:
Jys<br /><a href="http://jy-s.com" target="_blank" rel="nofollow">http://jy-s.com</a><br /> <br />Trying my very best to learn java, please forgive me if i'm asking some really stupid questions.
Either customize the renderer OR simple when the datatble record size is zero in COLLECTION_OBJECT, add an empty row in the COLLECTION_OBJECT inside the getter method of dataTable and set the text to "No records found" to any of the column property.
However, if you are only displaying rows, and the page is simple, I think you could get away with using the jstl tags to test for length. This tends to not be recommended, however.