2 Replies Latest reply on Jul 15, 2010 5:10 AM by Mirek Sz

    a4j:supprt not set form value

    Mirek Sz Newbie

      Hello
      I have controller wich set object person to Page scope before render a page


      @Name("personController")
      public class PersonController {
      
              @In(required = false, scope = ScopeType.PAGE)
              @Out(scope = ScopeType.PAGE)
              private Person person;
      
              public void preEdit() {
                      person = new Person();
                      person.setFirstName("John");
              }
      
              public void edit() {
                      System.out.println(person.getLastName());
              }
      }
      
      



      in my xhtml page


      <h:form id="form">
       <h:inputText id="firstName" value="#{person.firstName}" required="true">
          <a4j:support event="onclick" action="#{personController.edit}" immediate="true"/>
       </h:inputText>
       <h:inputText id="lastName" value="#{person.lastName}" rendered="true"/>
      </h:form>
                      
      



      When I click in firstName the request goes to server but injected person has old data. When I set immediate to false all works fine but I need skip validation phase.


      How to resolve this problem????


      Best regards