コード例 #1
0
ファイル: AppNavigationPage.java プロジェクト: aboutdata/NEFS
  public void handlePageBody(Writer writer, NavigationContext nc)
      throws ServletException, IOException {
    HttpServletRequest request = nc.getHttpRequest();
    String commandSpec =
        request.getParameter(PanelEditorCommand.PANEL_EDITOR_COMMAND_REQUEST_PARAM_NAME);
    if (commandSpec != null) {
      PanelEditorCommand command = new PanelEditorCommand();
      command.setParameters(commandSpec);
      // verify that this command is configured to be in this pae
      if (verifyPanelEditorInPage(nc, command)) {
        try {
          command.handleCommand(writer, nc, false);
        } catch (CommandException e) {
          getLog().error("Command error in body", e);
          throw new ServletException(e);
        }
        return;
      } else {
        log.error(
            "Request to execute a panel editor '"
                + command.getPanelEditorName()
                + "' that does not exist in page.");
      }
    }

    super.handlePageBody(writer, nc);
  }
コード例 #2
0
ファイル: EntityPage.java プロジェクト: aboutdata/NEFS
  public void finalizeContents() {
    super.finalizeContents();

    // in case redirector page target is not defined before this entity page, try now while we're
    // finalizing
    // contents because the entire tree should be loaded at this time
    if (redirectorPage == null && redirectorPageId != null) {
      setEntityRedirectorPageId(redirectorPageId);
      if (redirectorPage == null)
        throw new RuntimeException("Redirector page with id '" + redirectorPageId + "' not found.");
    }
  }