title: Grails -Gsp - How to make Check-box checked based on the value of the field
body: <p>I have a attribute called <code>status</code> in my domain which is <code>String</code> type can have any one of  two values <code>Applied , NotApplied</code></p>
  
  <p>I have two check boxes to input this value. in my edit page i want to display these two check box. </p>
  
  <p>If the value of  <code>status</code> is <code>Applied</code> then the corresponding checkbox must be checked.</p>
  
  <p>my code </p>
  
  <pre><code> &lt;g:message code="publicRuleInstance.course.label" default="Applied" /&gt;
  &lt;g:checkBox name="status " value="${publicRuleInstance?.status }" /&gt;
  
  &lt;g:message code="publicRuleInstance.course.label" default="NotApplied" /&gt;
  &lt;g:checkBox name="status " value="${publicRuleInstance?.status }" /&gt;
  </code></pre>
  
  <p>but here both the checkboxes are checked.</p>
  
  <p>there must be a way to check the value i.e if the status = Applied then that perticular checkbox must be cheched else it should be unchecked.</p>
  
  <p>Is there any way to doing it?</p>