0 Replies Latest reply on Jun 9, 2011 8:31 AM by Andrey Bondarenko

    ajax issue

    Andrey Bondarenko Newbie

      Hello!

       

      I have a simple page:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <!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:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich"
            xmlns:ui="http://java.sun.com/jsf/facelets">
      <h:head>
          <title>title</title>
      </h:head>
      <h:body>
          <h:form>
              <h:outputText value="choose:"/>
              <h:selectBooleanCheckbox value="#{pageBean.pane}" id="pan">
                  <a4j:ajax event="click" render="panel @this"/>
              </h:selectBooleanCheckbox>
      
      
              <rich:panel id="panel">
                  <h:outputText value="AAAAAA" rendered="#{pageBean.pane}"/>
      
      
                  <h:outputText value="BBBBBB" rendered="#{not pageBean.pane}"/>
              </rich:panel>
      
      
          </h:form>
      </h:body>
      </html>
      
      

       

      and a bean:

      package test;
      
      
      import javax.faces.bean.ViewScoped;
      import javax.inject.Named;
      import java.io.Serializable;
      
      
      @Named
      @ViewScoped
      public class PageBean implements Serializable
      {
          private boolean     pane    = false;
      
      
          public boolean isPane()
          {
              return pane;
          }
      
      
          public void setPane(boolean pane)
          {
              this.pane = pane;
          }
      }
      
      

       

      After page loaded it give me to check/uncheck the checkbox only one time and after it does not work until I refresh a page.

      There are no errors in server log or in javascript console in my browser.

       

      I use RF 4 final and jboss 6 final.

       

      Thanks!