title: Dojo filteringselect STRUTS application
body: <p>I am using DOJO UI framework for a STRUTS application. I need to find a way to invalidate the <code>filteringselect</code> item. The <code>invalidMessage</code> is getting set however the error icon does not show because all values in the list including the selected one are indeed valid items of the list.</p>
  
  <p>I noticed if i modify the <code>displayValue</code> in the <code>filteringselect</code> i am able to see the error icon and the <code>invalidMessage</code>. Is there a way to show the error icon and the <code>invalidMessage</code> without having to modifying the <code>displayValue</code> to an invalid value from the list?</p>
  
  <p>This validation is required since the user could select a valid option but it can be an invalid option based on the action being preformed by the user (custom validation)</p>
  
  <p>Here is the code:</p>
  
  <p><strong>HTML Struts and DOJO filteringselect</strong></p>
  
  <pre><code>&lt;s:select data-dojo-type="dijit/form/FilteringSelect"
     id="genderId" name=mygenderId" title="(7). Gender"
     headerKey="0" headerValue="Select Your Gender" list="genderList"
     listKey="id" missingMessage="Please Select Your Gender" required="true"
     invalidMessage="Invalid Gender Type !"
     listValue="genderName" style="width: 25em;" /&gt; 
  </code></pre>
  
  <p><strong>Server Side Validation</strong></p>
  
  <p>This does not work i cannot set a new invalidMessage.</p>
  
  <pre><code> var myWidgetValue = 'Invalid option please try again !';
   var myWidget = dijit.byId("genderId");
   myWidget.validator = function () {                                       
      console.log('Setting '+widgetName + " : "+myWidgetValue);
      this.set("invalidMessage", myWidgetValue);
   };
  
   myWidget._hasBeenBlurred = true;
   myWidget.validate();
  </code></pre>