[richfaces-issues] [JBoss JIRA] (RF-12333) "oncomplete" (seems like along with "onbeforedomupdate", "data") doesn't work when "@all" keyword specified in "render" attribute

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Fri Dec 21 03:05:08 EST 2012


     [ https://issues.jboss.org/browse/RF-12333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukáš Fryč resolved RF-12333.
-----------------------------

    Fix Version/s:     (was: 5-Tracking)
       Resolution: Duplicate Issue

    
> "oncomplete" (seems like along with "onbeforedomupdate", "data") doesn't work when "@all" keyword specified in "render" attribute
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RF-12333
>                 URL: https://issues.jboss.org/browse/RF-12333
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: base functionality , core
>    Affects Versions: 4.2.0.Final, 4.2.2.Final
>         Environment: no matter
>            Reporter: Alexander Kiselyov
>            Assignee: Lukáš Fryč
>              Labels: @all, a4j, data, onbeforedomupdate, oncomplete, partial-response
>
> 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.

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



More information about the richfaces-issues mailing list