title: JSF 2.0 Set default value on page
body: <p>I would like to know if there is a way to set a default value to a inputText, or inputHidden or any other tag that can be recovered in the backing bean when the page shows.</p>
  
  <p>I would like something like this (this code doesn't work):</p>
  
  <pre><code>&lt;h:inputText id="companyName" value="#{loginController.companyName}" defaultValue="123456"&gt;
  </code></pre>
  
  <p>And in the backing bean:</p>
  
  <pre><code>private String companyName;
  
  @PostConstruct
  public void init() {
      System.out.println("CompanyName=" + companyName);
  }
  </code></pre>
  
  <p>So that it shows "<strong>CompanyName=123456</strong>" in the console.</p>
  
  <p>I need to define the default value in the page itself, I don't want to put the default value in the backing bean.</p>
  
  <p><em>The real problem is that I need to find a way to pass a value to the backing bean defined in the page.</em> I have many pages and I want to define a 'mode' in each page to be shown differently, and this 'mode' needs to be read by the backing bean when the page displays (before any submit)</p>