Ejemplo n.º 1
0
 private void showForm(WorkItemRecord wir) {
   FormViewer form = new FormViewer(sb);
   String formURI = form.display(wir);
   if (formURI.startsWith("<failure>")) {
     showMessage(unwrap(formURI));
   } else {
     sb.setFormViewerInstance(form);
     sb.setRssFormWIR(wir);
     sb.setRssFormDisplay(true);
     if (formURI.equals("showDynForm")) formURI = "dynForm.jsp";
     redirect(formURI);
   }
 }
Ejemplo n.º 2
0
  public void prerender() {
    if (sb.isRssFormDisplay()) {
      String msg = "";
      FormViewer form = sb.getFormViewerInstance();
      if (form != null) {
        msg = form.postDisplay(sb.getRssFormWIR());
        sb.resetPostFormDisplay();
        if (successful(msg)) {
          msg = "Work Item successfully processed.";
        }
      } else {
        msg = "Unsuccessful form completion - could not finalise form.";
      }
      showMessage(msg + " Please click the button below to close this window/tab.");
    } else {
      HttpServletRequest request = getRequest();
      String userid = request.getParameter("userid");
      String password = request.getParameter("password");
      String itemid = request.getParameter("itemid");

      String msg = validateCredentials(userid, password);
      WorkItemRecord wir = null;
      if (successful(msg)) {
        wir = rm.getWorkItemRecord(itemid);
        if (wir == null) {
          msg =
              "Unknown Work Item ID - perhaps it has already been actioned"
                  + " and/or moved to another queue. Please refresh your worklist.";
        }
      }
      if (successful(msg)) {
        startAndShow(userid, wir);
      } else {
        showMessage(msg);
      }
    }
  }