Issue Type: Bug Bug
Affects Versions: 4.2.2.Final, 4.2.0.Final
Assignee: Unassigned
Components: core
Created: 18/Jun/12 4:37 PM
Description:

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.

Environment: no matter
Project: RichFaces
Labels: data a4j @all oncomplete onbeforedomupdate partial-response
Priority: Major Major
Reporter: Alexander Kiselyov
Security Level: Public (Everyone can see)
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira