Code example for JsPromptResult

Methods: confirm

0
  public void accept() { 
    AlertManager.removeAlert(this);
    if (isPrompt()) { 
      JsPromptResult promptResult = (JsPromptResult) result;
      String result = textToSend == null ? defaultValue : textToSend;
      promptResult.confirm(result);
    } else { 
      result.confirm();
    } 
  } 
 
  private boolean isPrompt() { 
    return result instanceof JsPromptResult;
  } 
 
  public void dismiss() { 
    AlertManager.removeAlert(this);
    result.cancel();
  }