Пример #1
0
  /** Deletes this view. */
  public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp)
      throws IOException, ServletException {
    requirePOST();
    checkPermission(DELETE);

    owner.deleteView(this);

    rsp.sendRedirect2(req.getContextPath() + "/" + owner.getUrl());
  }
Пример #2
0
 /** Same as {@link #getUrl()} except this returns a view/{name} path even for the default view. */
 public String getViewUrl() {
   return (owner != null ? owner.getUrl() : "") + "view/" + Util.rawEncode(getViewName()) + '/';
 }
Пример #3
0
 /**
  * Returns the path relative to the context root.
  *
  * <p>Doesn't start with '/' but ends with '/' (except returns empty string when this is the
  * default view).
  */
 public String getUrl() {
   return isDefault() ? (owner != null ? owner.getUrl() : "") : getViewUrl();
 }