PrimeFaces Ajax Callbacks [ (xhr, status, args) ]
PrimeFaces partial page rendering feature is powered by JSF 2.0′s standard Ajax APIs with some of our own extensions. One of these extensions is the client side callbacks for ajax request,standard f:ajax has onerror and onevent whereas PrimeFaces provides onerror,onsuccess,onstart and oncomplete so when do these callbacks are executed? onstart() onerror(xhr,status,exception) onsuccess(xml) oncomplete(xhr,args) This is the most popular callback that is used,fired when response is received and dom is updated,it gets three parameters,xhr is the request object,status is the response status as string and args is the optional callback parameters that are passed from server as JSON using PrimeFaces RequestContext API. I’ll create a detailed post about how to use the handy args feature soon. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |