Primefaces ajax字符集问题

发布于 2024-11-27 19:09:59 字数 335 浏览 4 评论 0原文

在我的之前的帖子中,我设法解决了这个问题。但是,在我尝试使用 Primefaces 的 commandButton 而不是“常规”commandButton 的表单上,我遇到了一个新问题。不知何故,Primefaces 会忽略字符集设置(即使自定义 Filter 包含在链中),并且错误的字符集文本会传递到托管 bean 的 actionListener 方法。如果ajax属性设置为false,一切正常,只有在发送ajax请求时才会出现问题。

有人知道如何解决这个问题吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晚风撩人 2024-12-04 19:09:59

您的问题已经存在一年了,我不确定您是否已经解决了这个问题,但我也遇到了同样的问题,并通过将属性字符集放在 p:commandLink 上来解决。

示例:

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

祝你好运!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文