protected Object formBackingObject(HttpServletRequest request) throws Exception {
    int contactId = RequestUtils.getRequiredIntParameter(request, "contactId");

    Contact contact = contactManager.getById(new Long(contactId));

    AddPermission addPermission = new AddPermission();
    addPermission.setContact(contact);

    return addPermission;
  }
Ejemplo n.º 2
0
  protected ModelAndView handleRequestInternal(
      HttpServletRequest request, HttpServletResponse response) throws Exception {

    String messageId = RequestUtils.getRequiredStringParameter(request, "messageid");

    String view = RequestUtils.getRequiredStringParameter(request, "view");

    String tx = MessageUtilities.waitResponse(messageId, MessageCodeConstants.TX_STATUS_INITIATED);

    if (tx.equals(MessageCodeConstants.TX_STATUS_INITIATED)
        || tx.equals(MessageCodeConstants.TX_STATUS_TIMED_OUT)) {
      return new ModelAndView(getTimeoutView(), "", null);
    }

    if (view.equals("waitForCSORResponse.do")) {
      return new ModelAndView("/aamva/cdlis/waitForCSORResponse", "messageid", messageId);
    }
    return new ModelAndView(new RedirectView(view), "messageid", messageId);
  }