DataTable: Add emptyMessage localization support
See original GitHub issueDescription
I always need to set a p:datatable
s 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:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your efforts, that was fast! Looking forward to added that to me properties file. That’s what I actually meant.
Please see my PR. This is localized now using the server side
Messages.properties
or if you language was German you would include aMessages_de.properties
.Not in the JavaScript locales API since this is not used in JS only in Server Side loading.