title: Thymleaf switch statement with multiple case
body: <p><strong>In Short</strong></p>
  
  <p>I want to have switch statement in thymeleaf with logic once written to multiple case statements.</p>
  
  <p><strong>In detail</strong></p>
  
  <p>I want to implement this in the thymeleaf</p>
  
  <pre><code>switch(status.value){
    case 'COMPLETE':
    case 'INVALID':
       //print exam is not active
       break;
    case 'NEW':
       //print exam is new and active
       break;
  }
  </code></pre>
  
  <p>My current thymleaf code which fails with runtime error</p>
  
  <pre><code> &lt;div th:switch="${status.value}"&gt;
        &lt;div th:case="'COMPLETE','INVALID'"&gt;
           &lt;!-- print object is not active --&gt;
        &lt;/div&gt;
        &lt;div th:case="NEW'"&gt;
           &lt;!-- print object is new and active --&gt;
        &lt;/div&gt;
   &lt;/div&gt;                             
  </code></pre>
  
  <p>But the above code fails with error</p>
  
  <blockquote>
  <pre><code>org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "'COMPLETE','INVALID'"...
  </code></pre>
  </blockquote>
  
  <p><strong>Note: I know the reason for this above error message. All I need is to know a way to implement switch with multiple cases for a single output</strong></p>