问题描述
Icefaces 2具有在不需要的地方启用Ajax的烦人习惯.它适用于很多事情,但不是全部:
Icefaces 2 has the annoying habit of enabling Ajax where I don't want it. It works for a lot of things, but not all of them:
- 对于触发文件下载的commandButton,文件未打开
- 如果发生异常,则不会导航到异常页面(在web.xml中指定)
将h:commandButton周围的f:ajax标签设置为disable ="true"即可解决该问题.我不想把它放到任何地方.
Putting a f:ajax tag around h:commandButton with disabled="true" solves it. I don't want to have to put it everywhere, however.
那么,如何默认禁用它?
So, how to disable this by default?
或者,我提交了一个使错误页面正常工作的问题,即使该表单是由(不亲和的)ajax提交的:如何制作错误页面(http 500)在IceFaces中工作?.
Alternatively, I submitted a question for making the error page work even if the form is submitted by (unsollicited) ajax: how to make error page (http 500) work in IceFaces? .
推荐答案
如此处所述:如何使错误页面(http 500)在IceFaces?.
可以根据 http://wiki.icefaces.org/display/禁用此功能ICE/Configuration ,方法是在web.xml中将autorender上下文参数设置为false.但是,然后,您需要在每个icefaces窗体上显式启用此行为(否则会出现错误).
This can be disabled, as per http://wiki.icefaces.org/display/ICE/Configuration , by setting autorender context parameter to false in web.xml . But then, you need to explicitely enable this behavior on every icefaces form (you get an error otherwise).
这篇关于使用Icefaces时如何在标准组件(h:commandButton)上禁用未修饰的ajax?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!