title: JSF EL set string property to null
body: <p>I have a string field <code>borderColor</code> in a bean that I wan't to set to <code>null</code> using EL but it is always being coerced to an empty string. </p>
  
  <pre><code>&lt;p:inputText value="#{axis.borderColor}" rendered="#{axis.borderColor != null}"&gt;
      &lt;p:ajax update=":form:plot"/&gt;
  &lt;/p:inputText&gt;
  
  &lt;p:commandButton value="#{msg.initialize}" action="#{axis.setBorderColor( 'cccccc' )}" rendered="#{axis.borderColor == null}" update=":form:mainTabs:axesSettings :form:plot"/&gt;
  &lt;p:commandButton value="#{msg.reset}" rendered="#{axis.borderColor != null}" update=":form:mainTabs:axesSettings :form:plot"&gt;
      &lt;f:setPropertyActionListener target="#{axis.borderColor}" value="#{null}" /&gt;
  &lt;/p:commandButton&gt;
  </code></pre>
  
  <ul>
  <li>If <code>borderColor</code> is null I display an "Initialize" button.  </li>
  <li>If <code>borderColor</code> is not null I display a text field where the user can type in a CSS color and a "Reset" button. When the reset button is pressed I want to set the borderColor back to null (I'm actually using the PrimeFaces p:colorPicker rather than a text field but the problem is the same).</li>
  </ul>
  
  <p>I've read all about <code>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</code> and I thought adding that context parameter would fix the problem but it didn't have any effect. It seems the null value being supplied by the <code>setPropertyActionListener</code> is being converted to an empty string for some reason.</p>
  
  <p>I'm using GlassFish 4.0 and PrimeFaces 4.0-SNAPSHOT</p>