title: Bean validation using a custom @RequiredWhen validator and required field decorator in JSF
body: <p>I have defined a custom jsr-303-Validator called <code>@RequiredWhen</code> which is like <code>@NotNull</code> but depending on some condition.</p>
  
  <p>In JSF, whenever I annotate a managed bean property with <code>@NotNull</code> a component like PrimeFaces <code>&lt;p:outputLabel for="that property"&gt;</code>, recognizes the property as required and marks it with an asterisk. Is it possible to implement or configure my custom Validator such that the asterisk is shown as well, if the condition in the <code>@RequiredWhen</code>-annotation becomes true? Thanks a lot.</p>
  
  <p>I'm using,</p>
  
  <ul>
  <li>Java EE 6</li>
  <li>GlassFish 3.1.2</li>
  <li>Mojarra 2.1.29</li>
  <li>PrimeFaces 5.2</li>
  </ul>