title: Autofill form data with jsf
body: <p>I am having trouble using JSF, I want to auto fill form data for my form and I want to input different data sets (depending on user login)
  for example:</p>
  
  <p>view :</p>
  
  <pre><code>&lt;h:form id="ftextform"&gt;
      &lt;div class="region"&gt;
          &lt;s:decorate template="/pr/layout/edit.xhtml"&gt;
              &lt;ui:define name="label"&gt;Account&lt;/ui:define&gt;
              &lt;h:inputText id="account" value="#{fundTranferExt.account}" required="true" /&gt;
          &lt;/s:decorate&gt;
  
          &lt;s:decorate template="/pr/layout/edit.xhtml"&gt;
              &lt;ui:define name="label"&gt;Amount&lt;/ui:define&gt;
              &lt;h:inputText id="amount" value="#{fundTranferExt.amount}" required="true" /&gt;
          &lt;/s:decorate&gt;
  
      &lt;/div&gt;
  
      &lt;h:commandButton id="test" value="test" action="#{fundTranferExt.setSomething}"/&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>and the bean</p>
  
  <pre><code>@Name("fundTranferExt")
  public class FundTranferExt implements IFundTranferExt
  {
      String account;
      int amount;
      public void setSomething()
      {
          // This code will not effect to view(xhtml) after executed
          if(username="A"){
              this.amount = 10000;
              this.account= "123456";
          }
          else{
              this.amount = 20000;
              this.account= "24689";
          }
  
      }
  
  
  ....
  </code></pre>
  
  <p>Any help much appreciated.</p>