orlat84 commented on issue #1: Avoid infinite loop when cycle in hierarchy
URL: https://github.com/apache/myfaces-trinidad/pull/1#issuecomment-482940607
 
 
   Had a look in the master branch and the code seems a lot changed between 
these versions. 
   I am not sure where this fix should be inserted in the newer versions.
   
   Regarding the test case I have a dummy one as I did not manage yet to catch 
the one from the customer environment, given the high degree of customizations 
they have.
   
   Let's say we have a page like this:
   _<%@ page contentType="text/html;charset=UTF-8"%>
   <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
   <%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich"; prefix="af"%>
   <f:view>
     <af:document id="d1" title="Infinite loop on click">
       <af:form id="f1">
         <af:commandButton text="Loop" id="cb1" action="#{TestBean.push}"/>
       </af:form>
     </af:document>
   </f:view>_
   
   and the button bean looks like this:
   
   `package net.orlat84;
   
   import javax.faces.component.UIComponent;
   import javax.faces.context.FacesContext;
   
   public class InfiniteLoopBean {
   
       public String push() {
           UIComponent d1 = 
FacesContext.getCurrentInstance().getViewRoot().findComponent("d1");
           UIComponent f1 = 
FacesContext.getCurrentInstance().getViewRoot().findComponent("f1");
           d1.setParent(f1);
           return null;
       }
   }
   `
   When the button is pressed an infinite loop is generated in the VM and the 
only way to get rid of it is to bounce the whole server.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to