Primefaces p:datatable without the "No Records found" message?

Asked

Viewed 397 times

2

And I have a p:datatable:

<p:dataTable var="ind" value="#{logIndPersistBean.list}" paginator="true" rows="10"
                        id="table"  rowStyleClass="odd-row, even-row">

                        <f:facet name="header">
                            Lista de Log
                        </f:facet>

                        <p:column headerText="Name" >
                            <h:outputText value="#{ind.name}"/>
                        </p:column>

                        <p:column headerText="Date" >
                            <h:outputText value="#{ind.date}" />
                        </p:column>

                        </p:column>

                </p:dataTable>

When I run a new search, if it does not return any records, the datatable displays the message "No Records found." , there’s some way that I don’t have to display this message, just the empty list ?

I’m using 4.0 primefaces.

enter image description here

Thanks in advance !

1 answer

6


This message is controlled by attribute emptyMessage of dataTable. For default the attribute value is "No Records Found", but nothing prevents you from changing that message:

<p:dataTable var="ind" value="#{logIndPersistBean.list}" paginator="true" rows="10"
             id="table" rowStyleClass="odd-row, even-row" emptyMessage="">
  • Thanks, I thought I’d have to change some css !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.