/** {@inheritDoc} */
  @Override
  protected ModelAndView handleRequestInternal(
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    String[] requiredParameters =
        new String[] {"parentResourceId or", "parentResourceType and parentResource"};

    String endUrl = WebSecurityUtils.sanitizeString(request.getParameter("endUrl"));

    String resourceId = WebSecurityUtils.sanitizeString(request.getParameter("parentResourceId"));
    if (resourceId == null) {
      String resourceType =
          WebSecurityUtils.sanitizeString(request.getParameter("parentResourceType"));
      String resource = WebSecurityUtils.sanitizeString(request.getParameter("parentResource"));
      if (request.getParameter("parentResourceType") == null) {
        throw new MissingParameterException("parentResourceType", requiredParameters);
      }
      if (request.getParameter("parentResource") == null) {
        throw new MissingParameterException("parentResource", requiredParameters);
      }

      resourceId = OnmsResource.createResourceId(resourceType, resource);
    }

    if (endUrl == null || "".equals(endUrl)) {
      endUrl = m_defaultEndUrl;
    }

    ChooseResourceModel model = m_chooseResourceService.findChildResources(resourceId, endUrl);

    return new ModelAndView("/graph/chooseresource", "model", model);
  }
 /**
  * getRequestParameter
  *
  * @param request a {@link javax.servlet.http.HttpServletRequest} object.
  * @param name a {@link java.lang.String} object.
  * @return a {@link java.lang.String} object.
  */
 protected String getRequestParameter(final HttpServletRequest request, final String name) {
   boolean allowHTML = false;
   if (s_allowHtmlFields.contains(name.toLowerCase())) {
     allowHTML = true;
   }
   return WebSecurityUtils.sanitizeString(request.getParameter(name), allowHTML);
 }