Although this error seems obvious, skimming the tracker didn't give me any similar issues, so I created this one.
I had tried to use command button component in this fashion:
<a4j:commandButton render="@all" oncomplete="someFunction()" />
but "oncomplete" JS code didn't work. After some investigation I figured out that appropriate code hasn't even been sent from the server as an extension element of JSF's <partial-response>. Investigation of Java code showed that ExtendedPartialViewContextImpl prevents handler from being attached to the response when "@all" keyword is specified (along with beforedomupdate and data):
org.richfaces.renderkit.AjaxConstants:
ALL = "@all";
<...>
org.richfaces.context.ExtendedPartialViewContextImpl.visitActivatorAtRender(Collection<String>):
if (!Boolean.TRUE.equals(renderAll) && !ids.contains(ALL)) {
addImplicitRenderIds(ids, limitRender);
appendOnbeforedomupdate(onbeforedomupdate);
appendOncomplete(oncomplete);
setResponseData(responseData);
}
These values (org.richfaces.context.ExtendedPartialViewContext.completeHandler, org.richfaces.context.ExtendedPartialViewContext.beforedomupdateHandler, org.richfaces.context.ExtendedPartialViewContext.responseData) are subsequently used by org.richfaces.renderkit.util.CoreAjaxRendererUtils.renderAjaxExtensions(FacesContext, UIComponent) to actually write extension elements of partial-response element to a user-agent.
I think, even if it is a "feature" (very weird on, I must admit) - it at least deserves to be mentioned in RichFaces Component Reference and VDL docs.
|