title: h:inputtext enable/disable from class
body: <p>hi as per my requirement there is one h:inputtext to find user. If user is found it populated first name, last name and email in corresponding h:inputtext which is disabled. but if not found that inputtext should become enabled and new details can be filled.</p>
  
  <pre><code>&lt;h:inputText value="#{countryBean.usersDetailsDTO.eid}" id="eid" required="true"       requiredMessage="Enter EID"&gt;
  
              &lt;f:ajax&gt;&lt;/f:ajax&gt;
          &lt;/h:inputText&gt;&lt;h:message styleClass="msgStyle4" id="msgEid" for="eid"/&gt;
      &lt;/div&gt;
      &lt;h:commandButton  styleClass="search_btn"   immediate="true"&gt;
          &lt;f:ajax listener="#{countryBean.getUserDetail}" render="empFName empLName empEmail" event="click" execute="@this" /&gt;
      &lt;/h:commandButton&gt;
      &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt;
  
      &lt;div class="form-field" style="margin-left:222px;"&gt;
          first Name  &lt;h:inputText value="#{countryBean.usersDetailsDTO.firstName}" id="empFName" required="true" requiredMessage="Enter First Name"&gt;
          &lt;f:validator validatorId="nameValidation" /&gt;
          &lt;/h:inputText&gt;&lt;h:message styleClass="msgStyle4" id="msgfn" for="empFName"/&gt;
      &lt;/div&gt;
      &lt;div class="clear"&gt;&lt;/div&gt;
      &lt;div class="form-field" style="margin-left:10px;"&gt;
          last name  &lt;h:inputText value="#{countryBean.usersDetailsDTO.lastName}" id="empLName" required="true" requiredMessage="Enter Last Name"&gt;
          &lt;f:validator validatorId="nameValidation" /&gt;
          &lt;/h:inputText&gt;&lt;h:message styleClass="msgStyle4"  id="msgln" for="empLName"/&gt;
      &lt;/div&gt;&lt;div class="clear"&gt;&lt;/div&gt;
      &lt;div class="form-field" style="margin-left:10px;"&gt;
          email&lt;h:inputText value="#{countryBean.usersDetailsDTO.email}" id="empEmail" required="true" requiredMessage="Enter Email Address"&gt;
          &lt;f:validator validatorId="emailValidation" /&gt;
          &lt;/h:inputText&gt;&lt;h:message styleClass="msgStyle4"  id="msgEmail" for="empEmail"/&gt;
      &lt;/div&gt;
  </code></pre>