混合ajax和完整请求:handle“;Http传输返回了一个0状态代码"-错误
我有两个相同形式的行动,我无法用类似主题中的建议解决问题: 一, 有没有一种方法可以在不使用javascript阻塞UI的情况下处理此问题?我想到一个用户友好的自定义消息 我试过了混合ajax和完整请求:handle“;Http传输返回了一个0状态代码"-错误,ajax,jsf,jsf-2,Ajax,Jsf,Jsf 2,我有两个相同形式的行动,我无法用类似主题中的建议解决问题: 一, 有没有一种方法可以在不使用javascript阻塞UI的情况下处理此问题?我想到一个用户友好的自定义消息 我试过了 <f:ajax onerror=""/> 但在这种情况下,错误处理程序将不会启动 <h:commandLink action="#{bean.downloadFile}"> Download some File </h:commandLink> public vo
<f:ajax onerror=""/>
但在这种情况下,错误处理程序将不会启动
<h:commandLink action="#{bean.downloadFile}">
Download some File
</h:commandLink>
public void timeConsumingAction() {
//time-consuming business-action
}
public void downloadFile() {
try {
Faces.sendFile(someFile, true);
} catch (IOException e) {
e.printStackTrace();
}
}
httpError: The Http Transport returned a 0 status code. This is usually the result of mixing ajax and full requests. This is usually undesired, for both performance and data integrity reasons
<f:ajax onerror=""/>