title: Show error messages of fields in a popup after submit
body: <p>I am trying to open a popup using the below code in jsf.</p>
  
  <pre><code>&lt;a href="#" data-toggle="modal" data-backdrop="static" data-target="#forgotPassword"&gt;Forgot password&lt;/a&gt;
  
  &lt;div class="modal fade" jsf:id="forgotPassword"&gt;
      &lt;div class="modal-dialog"&gt;
          &lt;form jsf:id="reset-password-form"&gt;
              &lt;div class="modal-content"&gt;
                  &lt;div class="modal-header"&gt;                  
                      &lt;h4 class="modal-title"&gt;Request for new password&lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-body"&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="inputEmail"&gt;EmailId&lt;/label&gt;
                          &lt;div class="col-sm-9"&gt;
                              &lt;input type="text" class="form-control" jsf:id="inputEmail"
                                  jsf:value="#{myBean.passwordResetEmail}"
                                  name="inputEmail" /&gt;
                              &lt;h:message for="inputEmail" /&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-footer"&gt;
                      &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Cancel&lt;/button&gt;
                      &lt;button class="btn btn-primary"
                          jsf:action="#{myBean.resetPassword}"&gt;sendPassword&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I am facing some issues here.</p>
  
  <ol>
  <li>When the user enters wrong email Id, the user shall be on same page and errors shall be shown. But I see, the popup closes automatically when the invalid emailId is entered.</li>
  <li>I also want to display success messages as well.</li>
  </ol>
  
  <p>Can any one help me how to do that.</p>