title: Thymeleaf to check null and display value accordingly
body: <p>How to display <code>user_name</code> and <code>user_id</code> inside th:title.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div class="ui-widget tooltip-wrapper" data-toggle="tooltip" data-placement="right" th:title="*{user_id} + ${'-' + creator.user_name}" &gt; &lt;/div&gt;
  </code></pre>
  
  <p>I need to check whether <code>user_id</code> is not null and also <code>user_name</code> is not null and display both in tool tip.</p>
  
  <p>Sample :  <code>101 - Janet</code></p>
  
  <p>I tried with <code>th:title="*{user_id!=null} + ${'-' + creator.user_name}"</code>.
  But it is displaying as <code>true</code> instead of the actual value.</p>
  
  <p>Currently if the value is null, it is displaying as <code>null</code> in tooltip. But I don't want to display if the value is null or empty.</p>
  
  <p>Can anyone help on this. Thanks.</p>