Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
混合ajax和完整请求:handle“;Http传输返回了一个0状态代码"-错误_Ajax_Jsf_Jsf 2 - Fatal编程技术网

混合ajax和完整请求:handle“;Http传输返回了一个0状态代码"-错误

混合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

我有两个相同形式的行动,我无法用类似主题中的建议解决问题:

一,

有没有一种方法可以在不使用javascript阻塞UI的情况下处理此问题?我想到一个用户友好的自定义消息

我试过了

  <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=""/>