I am searching and searching, but I cannot find anything to solve my problem. I am using DataTable (Primefaces) and wondering how I can change the language / output of some fields.
More precisely, I want to change {CurrentPageReport} to a PaginatorTemplate. Now it looks very simple: (0 out of 100). I want this to be so (Page 0 of 100, 500 results).
I tried a lot, but nothing works. The last thing I did was:
function change_text () { $(".ui-paginator-current").each (function() { $(this).html("Simple test"); }); } $(".ui-icon").each( function(index) { $( this ).bind ("click",function(){ change_text (); }); } );
(The ui icon is part of each button in the table.)
But this is not as effective as you can see :-) This solution works halfway. When I click the button (next page, previous page), the text in the .ui-paginator-current field returns to the default template. I know .. the reason is that this field is also reloading.
I also tried changing the Rules Code, but I cannot find the correct area of ββthe code.
I work with JSF 2.0.3 and PrimeFaces 2.2.1. How can I solve my problem? Can I download paginatorTemplate from a bean? It would really help me if I could change the text from "0 to 100" to "0 aus 100" (German).
Hope you guys can help me like every time I have a problem.
Ioannis K.
source share