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

Thomas W updated RF-7192:
-------------------------

    Description: 
RF 3.3.0 GA

Issue with server side processing of AJAX enabled components that are outside 
of any region that is requested to be rendered as well as any a:outputPanel 
with ajaxRendered="true". This happens with tree and table components, for 
example.

I could track this down to behavior in UIDataAdapter. With the following change 
the unwanted processing is turned off:

public void encodeAjaxChild(FacesContext context, String path,
  final Set<String> ids, final Set<String> renderedAreas) throws IOException {

                boolean isRenderedPath = false;
                for (String id : ids) {
                        if (id.startsWith(path)) {
                                isRenderedPath = true;
                        }
                }
                if (!isRenderedPath) {
                        return;
                }


With this addition, any component that falls outside the list of requested ids 
(reRender) will be skipped. This has muted the excessive component processing 
(processing that would never result in DOM rendering). 

A real fix would need to allow for processing of outputPanels with 
ajaxRendered="true". What is the correct fix for this problem?

    <a:outputPanel id="searchResults" ajaxRendered="false" 
styleClass="noBorder">
    <a:region>
          <h:form id="searchForm" styleClass="noBorder">
            <rich:scrollableDataTable .... 
                <a:support event="onselectionchange"
                    action="#{someAction.process}" reRender="region1,region2" 
                    limitToList="true"
                    status="globalStatus"/>

Call originates from AjaxChildrenRenderer.encodeAjaxComponent:

                if (!found) {
                        if (component instanceof AjaxChildrenEncoder) {
                                ((AjaxChildrenEncoder) 
component).encodeAjaxChild(
                                                context, currentPath, ids, 
renderedAreas);
                        } else {


Stack trace:

HtmlTree(UIDataAdaptor).encodeAjaxChild(FacesContext, String, Set<String>, 
Set<String>) line: 454       
AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxComponent(FacesContext, 
UIComponent, String, Set<String>, Set<String>) line: 104     
AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxChildren(FacesContext, 
UIComponent, String, Set<String>, Set<String>) line: 67       
AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxComponent(FacesContext, 
UIComponent, String, Set<String>, Set<String>) line: 115     
AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxChildren(FacesContext, 
UIComponent, String, Set<String>, Set<String>) line: 67       
AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxComponent(FacesContext, 
UIComponent, String, Set<String>, Set<String>) line: 115     
AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxChildren(FacesContext, 
UIComponent, String, Set<String>, Set<String>) line: 67       


  was:
RF 3.3.0 GA

Issue with server side processing of AJAX enabled components that are outside 
of any region that is requested to be rendered as well as any a:outputPanel 
with ajaxRendered="true". This happens with tree and table components, for 
example.

I could track this down to behavior in UIDataAdapter. With the following change 
the unwanted processing is turned off:

public void encodeAjaxChild(FacesContext context, String path,
  final Set<String> ids, final Set<String> renderedAreas) throws IOException {

                boolean isRenderedPath = false;
                for (String id : ids) {
                        if (id.startsWith(path)) {
                                isRenderedPath = true;
                        }
                }
                if (!isRenderedPath) {
                        return;
                }


With this addition, any component that falls outside the list of requested ids 
(reRender) will be skipped. This has muted the excessive component processing 
(processing that would never result in DOM rendering). 

A real fix would need to allow for processing of outputPanels with 
ajaxRendered="true". What is the correct fix for this problem?

    <a:outputPanel id="searchResults" ajaxRendered="false" 
styleClass="noBorder">
    <a:region>
          <h:form id="searchForm" styleClass="noBorder">
            <rich:scrollableDataTable .... 
                <a:support event="onselectionchange"
                    action="#{someAction.process}" reRender="region1,region2" 
                    limitToList="true"
                    status="globalStatus"/>




> Ajax component processing outside of region/form
> ------------------------------------------------
>
>                 Key: RF-7192
>                 URL: https://jira.jboss.org/jira/browse/RF-7192
>             Project: RichFaces
>          Issue Type: Bug
>          Components: component-a4j-core
>    Affects Versions: 3.3.0
>            Reporter: Thomas W
>
> RF 3.3.0 GA
> Issue with server side processing of AJAX enabled components that are outside 
> of any region that is requested to be rendered as well as any a:outputPanel 
> with ajaxRendered="true". This happens with tree and table components, for 
> example.
> I could track this down to behavior in UIDataAdapter. With the following 
> change the unwanted processing is turned off:
> public void encodeAjaxChild(FacesContext context, String path,
>   final Set<String> ids, final Set<String> renderedAreas) throws IOException {
>               boolean isRenderedPath = false;
>               for (String id : ids) {
>                       if (id.startsWith(path)) {
>                               isRenderedPath = true;
>                       }
>               }
>               if (!isRenderedPath) {
>                       return;
>               }
> With this addition, any component that falls outside the list of requested 
> ids (reRender) will be skipped. This has muted the excessive component 
> processing (processing that would never result in DOM rendering). 
> A real fix would need to allow for processing of outputPanels with 
> ajaxRendered="true". What is the correct fix for this problem?
>     <a:outputPanel id="searchResults" ajaxRendered="false" 
> styleClass="noBorder">
>     <a:region>
>           <h:form id="searchForm" styleClass="noBorder">
>             <rich:scrollableDataTable .... 
>                 <a:support event="onselectionchange"
>                     action="#{someAction.process}" reRender="region1,region2" 
>                     limitToList="true"
>                     status="globalStatus"/>
> Call originates from AjaxChildrenRenderer.encodeAjaxComponent:
>               if (!found) {
>                       if (component instanceof AjaxChildrenEncoder) {
>                               ((AjaxChildrenEncoder) 
> component).encodeAjaxChild(
>                                               context, currentPath, ids, 
> renderedAreas);
>                       } else {
> Stack trace:
> HtmlTree(UIDataAdaptor).encodeAjaxChild(FacesContext, String, Set<String>, 
> Set<String>) line: 454     
> AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxComponent(FacesContext, 
> UIComponent, String, Set<String>, Set<String>) line: 104   
> AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxChildren(FacesContext, 
> UIComponent, String, Set<String>, Set<String>) line: 67     
> AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxComponent(FacesContext, 
> UIComponent, String, Set<String>, Set<String>) line: 115   
> AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxChildren(FacesContext, 
> UIComponent, String, Set<String>, Set<String>) line: 67     
> AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxComponent(FacesContext, 
> UIComponent, String, Set<String>, Set<String>) line: 115   
> AjaxRegionRenderer(AjaxChildrenRenderer).encodeAjaxChildren(FacesContext, 
> UIComponent, String, Set<String>, Set<String>) line: 67     

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to