JSF2 MyFaces和CDATA使f:ajax渲染失败 [英] JSF2 MyFaces and CDATA makes f:ajax render fail

查看:59
本文介绍了JSF2 MyFaces和CDATA使f:ajax渲染失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用MyFaces 2.0在h:outputscripts中使用CDATA块时遇到一些问题...但是我不确定我是否应该避免在JSF2中使用CDATA还是因为我做错了事.
也许是因为我在许多Composite组件中使用了许多脚本...
事实是,当我有一些包含脚本的复合组件时,这些脚本被CDATA块包围,该页面中的其他脚本不起作用.
删除CDATA可解决此问题. 不过,我遇到了一个问题,即使用CDATA块使我的Composite组件出现了一些错误,即在尝试使用f:ajax render属性渲染组件时,无法在NamingContainer类上找到该组件的属性. 这是解决方法.
删除脚本周围的CDATA可解决此问题.
所以我的问题是:我是唯一一个遇到CDATA块和JSF2(MyFaces)问题的人吗?

I'm facing some problems using CDATA blocks inside h:outputscripts with MyFaces 2.0... but I don't know exactly if I should avoid using CDATA with JSF2 or if it is because I do things wrong.
Maybe it is because I use many scripts in many Composite components...
The fact is that when I have some composite components that contain scripts with surrounded by CDATA blocks, other scripts in the page doen't work.
Removing CDATAs solves the issue. Nevertheless I've had an issue where using CDATA blocks made some of my Composite components bug saying a property of the component can't be found on class NamingContainer when trying to render the component using f:ajax render attribute. Here is the workaround.
Removing the CDATA surrounding my scripts solved the problem.
So my question is : am I the only one having troubles with CDATA blocks and JSF2 (MyFaces) ?

推荐答案

这是一个已知问题.有关详细信息,请参见 MYFACES-3339 .它已经修复,因此您可以尝试使用最新代码 HERE ,它将包含在2.1.4和2.0.10中.

This is a known issue. See MYFACES-3339 for details. It was already fixed, so you can try the latest code HERE, and it will be included on 2.1.4 and 2.0.10.

这篇关于JSF2 MyFaces和CDATA使f:ajax渲染失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆