code: public void displayDialog(boolean writeLater) throws JspException, IOException, ServletException {
  
          if (isForwarded()) {
              return;
          }
          switch (getAction()) {
  
              case ACTION_CANCEL:
                  // ACTION: cancel button pressed
                  actionCancel();
                  actionCloseDialog();
                  break;
  
              case ACTION_ERROR:
                  // ACTION: an error occurred (display nothing)
                  break;
  
              case ACTION_SAVE:
                  // ACTION: save edited values
                  setParamAction(DIALOG_OK);
                  actionCommit();
                  if (closeDialogOnCommit()) {
                      setAction(ACTION_CANCEL);
                      actionCloseDialog();
                      break;
                  }
                  setAction(ACTION_DEFAULT);
  
                  //$FALL-THROUGH$
              case ACTION_DEFAULT:
              default:
                  // ACTION: show dialog (default)
                  if (!writeLater) {
                      writeDialog();
                  }
          }
      }
docs: Performs the dialog actions depending on the initialized action and displays the dialog form if needed.<p>
  
  @param writeLater if <code>true</code> no output is written,
  you have to call manually the <code>{@link #defaultActionHtml()}</code> method.
  
  @throws JspException if dialog actions fail
  @throws IOException if writing to the JSP out fails, or in case of errors forwarding to the required result page
  @throws ServletException in case of errors forwarding to the required result page