Ajax Request never stops in some case
nfeybesse Jul 14, 2008 11:42 AMIn this example, test1 and test2 never stops. test0, test3 works ...
I think that what you send should be independent of what you receive in Ajax Requests.
In test1 and test2, the region disappears and Ajax Request never stops.
Is causes many problems in my application.
Is it normal or is it a bug ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a="http://richfaces.org/a4j" xmlns:c="http://java.sun.com/jstl/core"> <head> </head> <body> <f:view> <h:panelGrid id="panelGrid"> <a:status id="commonstatus" startText="In progress..." stopText="Complete" /> <h:form> <a:region immediate="true"> <c:if test="#{testRegion.rendered}"> <a:commandButton action="#{testRegion.setRendered(false)}" value="test0" reRender="panelGrid" status="commonstatus" /> </c:if> </a:region> </h:form> <h:form> <c:if test="#{testRegion.rendered}"> <a:region immediate="true"> <a:commandButton action="#{testRegion.setRendered(false)}" value="test1" reRender="panelGrid" status="commonstatus" /> </a:region> </c:if> </h:form> <c:if test="#{testRegion.rendered}"> <h:form> <a:region immediate="true"> <a:commandButton action="#{testRegion.setRendered(false)}" value="test2" reRender="panelGrid" status="commonstatus" /> </a:region> </h:form> </c:if> <h:form> <c:if test="#{testRegion.rendered}"> <a:commandButton action="#{testRegion.setRendered(false)}" value="test3" reRender="panelGrid" status="commonstatus" /> </c:if> </h:form> <h:form> <a:commandButton action="#{testRegion.setRendered(true)}" value="initialize" reRender="panelGrid" status="commonstatus" /> </h:form> </h:panelGrid> </f:view> </body> </html>
and bean code :
@Name("testRegion") @Scope(ScopeType.SESSION) public class TestRegion { boolean rendered=true; public boolean isRendered() { return rendered; } public void setRendered(boolean rendered) { this.rendered = rendered; } }