onerror调用此函数:
onerror(xhr,status,exception)-当ajax请求失败时要处理的Javascript回调。接受三个参数,xmlhttprequest,状态字符串和引发的异常(如果有)。
此信息来自文档。xhr-实际上是一个请求。因此可以找到请求状态和许多其他信息。
<p:commandButton action="#{someone.doSomething()}" ajax="true" onerror="console.debug(xhr)"></p:commandButton>在chrome或firebug中尝试此代码。它将显示xhr对象
查看http://primefaces.googlepre.com/files/primefaces_users_guide_3_0.pdf
7.2节Ajax API



