title: <h:selectOneMenu> only one of the option gives "validation Error: value is not valid"
body: <p>I have read some existing posts about this. None suits my case.</p>
  
  <p>In my program, I used bunch of h:selectOneMenu and they all work just fine. Except that for this one specific h:selectOneMenu, if I choose one <strong>specific option</strong>, I get a "taskForm:taskDropDown: Validation Error: Value is not valid"</p>
  
  <p>The code is:</p>
  
  <pre><code>&lt;h:selectOneMenu id="taskDropDown" value="#{fetchQuery.taskName}"&gt;
      &lt;f:selectItem itemValue="" itemLabel="Select.." /&gt;
      &lt;f:selectItems value="#{getInitiative.allTaskNames}" var="t"
          itemLabel="#{t}" itemValue="#{t}" /&gt;
      &lt;f:ajax listener="#{getInitiative.taskChosen()}" immediate="false" /&gt;
  &lt;/h:selectOneMenu&gt;
  </code></pre>
  
  <p>Here, the "getInitiative.allTaskNames" is an array of String. This is what it contains when I check the debug window:</p>
  
  <blockquote>
    <p>[Identify appropriate tests/coverage, Build scripts in Selenium for identified UI tests, Build scripts identified in SOATest Service tests, Identifiy appropriate timing for execution of scripts, Identifiy appropriate reporting metrics , Modify dashboard to run scheduled tests, Identify new database to store common test results, Design new web UI for IMPACT automation , Implement reporting into the database, Build new web UI for IMPACT automation , ytugjkh]</p>
  </blockquote>
  
  <p>If I choose the option "Build new web UI for IMPACT automation ", the error occurs and the ajax part is not evoked.</p>
  
  <p>Usually the error occurs because of one of two reasons:</p>
  
  <p>"equal" method is broken for the object. I am using String, so the equal() should be ok.</p>
  
  <p>The value of the data is changed. Which is probably not the case either, because the array is only populated for once and no longer changed. Moreover, other options in the array are just working fine.</p>