title: c:when and c:if don't work
body: <p>I can access my variable stored in a backing bean from my JSF2 page, so things like</p>
  
  <pre><code>&lt;h:outputText value="#{myBean.myValue}"/&gt;
  </code></pre>
  
  <p>work, and the value (which is an <strong>int</strong> btw.) prints okay.
  However, when trying to use this value in conditional expressions within c:if and/or c:when tags it never equals anything... so:</p>
  
  <pre><code>&lt;c:if test="#{myBean.myValue == 1}"&gt;
      &lt;c:set var="myVar" value="true"/&gt;
  &lt;/c:if&gt;
  
  &lt;c:choose&gt;
      &lt;c:when test="#{myBean.myValue &gt; 1}"&gt;
          &lt;c:set var="myVar" value="true"/&gt;
      &lt;/c:when&gt;
  &lt;/c:choose&gt;
  </code></pre>
  
  <p>or even </p>
  
  <pre><code>#{myBean.myValue eq '1'} 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>#{myBean.myValue == '1'}
  </code></pre>
  
  <p>will never evaluate to true, even if the value is indeed 1 or >1.</p>
  
  <p>Annoyingly the comparison works in the <strong>rendered</strong> attribute of a tag! So this:</p>
  
  <pre><code>&lt;h:outputText value="whatever" rendered="#{myBean.myValue == 1}"/&gt;
  </code></pre>
  
  <p>is fine!</p>
  
  <p>What is going on?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>This works:</p>
  
  <pre><code>public int getMyValue() {
      return 1;
  }
  </code></pre>
  
  <p>but this does not:</p>
  
  <pre><code>@Column(name = "orderstatus")
  public int getOrderStatus() {
  return orderStatus;
  }
  </code></pre>
  
  <p>The int's value is printed correctly, but 1 == 1 is false.</p>
  
  <p>Are entity beans handled in a special way? Can I use them for displaying their value on the UI?</p>
  
  <p><strong>UPDATE2:</strong></p>
  
  <pre><code>&lt;h:outputText value="#{order.adcOrderStatus.orderStatus.class}"/&gt;
  </code></pre>
  
  <p>prints java.lang.Integer.</p>
  
  <p><strong>UPDATE3:</strong></p>
  
  <p>Here is the full code:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:c="http://java.sun.com/jsp/jstl/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:cc="http://java.sun.com/jsf/composite"&gt;
      &lt;cc:interface&gt;
          &lt;cc:attribute name="orderStatus" required="true"/&gt;
      &lt;/cc:interface&gt;
      &lt;cc:implementation&gt;
          &lt;c:choose&gt;
              &lt;c:when test="#{cc.attrs.orderStatus == 1}" &gt;
                  &lt;c:set var="unknownStatus" value="false"/&gt;
              &lt;/c:when&gt;
              &lt;c:when test="#{cc.attrs.orderStatus == 2}" &gt;
                  &lt;c:set var="unknownStatus" value="false"/&gt;
              &lt;/c:when&gt;
              &lt;c:when test="#{cc.attrs.orderStatus == 3}" &gt;
                  &lt;c:set var="unknownStatus" value="false"/&gt;
              &lt;/c:when&gt;
              &lt;c:when test="#{cc.attrs.orderStatus == 99}" &gt;
                  &lt;c:set var="unknownStatus" value="false"/&gt;
              &lt;/c:when&gt;
              &lt;c:otherwise&gt;
                  &lt;c:set var="unknownStatus" value="true"/&gt;
              &lt;/c:otherwise&gt;
          &lt;/c:choose&gt;
          &lt;h:graphicImage url="#{resource['img/icons/flag_yellow.png']}" rendered="#{cc.attrs.orderStatus == 1}"/&gt;
          &lt;h:outputText value="Created" rendered="#{cc.attrs.orderStatus == 1}"/&gt;
          &lt;h:graphicImage url="#{resource['img/icons/flag_orange.png']}" rendered="#{cc.attrs.orderStatus == 2}"/&gt;
          &lt;h:outputText value="Stopped" rendered="#{cc.attrs.orderStatus == 2}"/&gt;
          &lt;h:graphicImage url="#{resource['img/icons/flag_green.png']}" rendered="#{cc.attrs.orderStatus == 3}"/&gt;
          &lt;h:outputText value="Active" rendered="#{cc.attrs.orderStatus == 3}"/&gt;
          &lt;h:graphicImage url="#{resource['img/icons/flag_red.png']}" rendered="#{cc.attrs.orderStatus == 99}"/&gt;
          &lt;h:outputText value="Failed" rendered="#{cc.attrs.orderStatus == 99}"/&gt;
          &lt;h:graphicImage url="#{resource['img/icons/question_mark.png']}" rendered="#{unknownStatus}"/&gt;
          &lt;h:outputText value="Unknown" rendered="#{unknownStatus}"/&gt;
      &lt;/cc:implementation&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It works when called with an int value. But this doesn't work:</p>
  
  <pre><code>    &lt;p:dataTable value="#{cc.attrs.orders}" var="order"&gt;
          &lt;p:column&gt;
              &lt;f:facet name="header"&gt;
                  &lt;h:outputText value="Status"/&gt;
              &lt;/f:facet&gt;
              &lt;mytag:orderStatus orderStatus="#{order.adcOrderStatus.orderStatus}"/&gt;
          &lt;/p:column&gt;
      &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>This displays the correct value:</p>
  
  <pre><code>&lt;h:outputText value="#{order.adcOrderStatus.orderStatus.class}"/&gt;
  </code></pre>