question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataTable: Add emptyMessage localization support

See original GitHub issue

Description I always need to set a p:datatables emptyMessage to a localized string. Often times I just forget that though. The text “No records found.” seems to be hard coded into src/main/java/org/primefaces/component/datalist/DataListBase.java,
src/main/java/org/primefaces/component/datagrid/DataGridBase.java and
src/main/java/org/primefaces/component/treetable/TreeTableBase.java.

Solution This is something I would really like to see added to something like the PrimeFaces Locales Javascript API.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
zhedarcommented, Jan 6, 2021

Thanks for your efforts, that was fast! Looking forward to added that to me properties file. That’s what I actually meant.

1reaction
mellowarecommented, Jan 6, 2021

Please see my PR. This is localized now using the server side Messages.properties or if you language was German you would include a Messages_de.properties.

Not in the JavaScript locales API since this is not used in JS only in Server Side loading.

Read more comments on GitHub >

github_iconTop Results From Across the Web

language.emptyTable - DataTables
This string is shown in preference to language.zeroRecords when the table is empty of data (regardless of filtering) - i.e. there are zero...
Read more >
Put pipe inside emptyMessage · Issue #589 - GitHub
I want to translate the emptyMessage. ... Is there any way to handle this? May be through ngx-datatable-body-template ? ... What is the...
Read more >
How to Change datatable default empty table message
It works fine. But i need to change the default table empty message No data available in table to No records found ....
Read more >
p:datatable emptyMessage not shown - PrimeFaces forum
RC1-SNAPSHOT (tested today) when getting no values for the data table. It shows only the header and if activated the pagination footer line....
Read more >
Can not personalize texts on ngx-datatable object "globally ...
I can do it by adding on each ngx-datatable parmaters the following line: [messages]="{emptyMessage: '::NoDataAvailable' | abpLocalization, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found