2

In my earlier post I managed to solve the problem. But, on forms where I tried to use Primefaces' commandButton instead of "regular" commandButton, I encountered a new problem. Somehow, Primefaces ignore charset settings (even when custom Filter is included in chain) and wrong charset text is passed to managed bean's actionListener method. If ajax attribute is set to false, everything works fine, problem only occurs when ajax request is sent.

Does anybody have an idea how to solve this problem?

Community
  • 1
  • 1
Vladimir
  • 305
  • 1
  • 7
  • 16
  • 2
    Is there a reason that you prefer using `ISO-8859-2` over the widely recommended `UTF-8`? Making everything `UTF-8` would solve all your problems, now and in the future. – BalusC Aug 04 '11 at 13:08
  • Well, I have to work on existing MySQL database which has latin2 charset (for sorting benefits over UTF8 charset). – Vladimir Aug 04 '11 at 13:16
  • Just configure the collation, that's the one which is used by sorting. – BalusC Aug 04 '11 at 13:18
  • Collation is configured to "latin2_croatian_ci", and I am not sure if any collation on UTF8 charset would give the same results. – Vladimir Aug 04 '11 at 13:22

1 Answers1

0

Your question is one year old and I'm not sure if you already solved this problem, but I had the same problem and solved by putting the attribute charset on p:commandLink.

Example:

<p:commandLink action="#{myController.addItem(item)}" charset="ISO-8859-2">

Good luck!

André
  • 444
  • 1
  • 7
  • 13