title: In jsf how integer properties get value 0 in client page without process validation phase for first time request
body: <p>I have a bean as shown </p>
  
  <pre><code>@ManagedBean
  @RequestScoped
  public class Demo {
  private int value1;
  private String value2;
  
  ..getter and setter..
  </code></pre>
  
  <p>this is my xhtml page demo.xhtml</p>
  
  <pre><code>&lt;h:form&gt;
          &lt;p:panelGrid columns="2"&gt;
          &lt;p:outputLabel value="id"&gt;&lt;/p:outputLabel&gt;
          &lt;p:inputText value="#{demo.value1}"&gt;&lt;/p:inputText&gt;
          &lt;p:outputLabel value="name"&gt;&lt;/p:outputLabel&gt;
          &lt;p:inputText value="#{demo.value2}"&gt;&lt;/p:inputText&gt;
          &lt;/p:panelGrid&gt;
      &lt;/h:form&gt;
  </code></pre>
  
  <p>how the integer value get 0 value in the client page
  <img src="https://i.stack.imgur.com/tFtus.jpg" alt="enter image description here"></p>
  
  <p>i have read that in request processing lifecycle, for first time request, <strong>jsf runtime will create new view and directly goes to render phase</strong>. how values are set to client page without process validation phase.</p>
  
  <p>i read these lines from jsf 2.0 complete reference</p>
  
  <pre><code>*Initial request to view the register.xhtml page
  
  Since this
  is an initial request (also referred to as a “non-postback” request) to view the
  registration page, the Restore View phase creates an empty View (UIViewRoot)
  component tree and stores it in the FacesContext instance.
  </code></pre>
  
  <p>After the View is created, the lifecycle immediately proceeds directly to the Render
  Response phase
  , since there was no incoming field data in the request to validate or
      process (also referred to as a “non-postback” request).*</p>
  
  <p>i think this sentence help to understand my question. expect answer in lifecycle point of view</p>