5 Replies Latest reply on Feb 12, 2008 8:28 AM by Mauro T

    a4j support and immediate

    Mauro T Newbie

      Hi all,

      I was trying to make a text field with a4j:support an immediate component. But when I set it with immediate="true" the managed bean does not receive the value sent via ajax, it is null. Why ?

      test.jsf

      <h:inputText value="#{test.name}">
       <f:validateLength minimum="2" />
       <a4j:support event="onblur" actionListener="#{test.doSomething}"
       reRender="parent"
       immediate="true" />
      </h:inputText>
      


      Test.java
      public class Test {
       private String name;
      
       public String getName() {
       return name;
       }
      
       public void setName(String name) {
       this.name = name;
       }
      
       public void doSomething(ActionEvent actionEvent) {
       System.out.println("OOPS:"+name);
       }
      }
      


      output...
      OOPS:null
      


      As you can see, the method is invoked properly but the value is not sent!!!
      Removing the immediate attribute everything goes normal.