コード例 #1
0
  /**
   * Tela edit mav.
   *
   * @param telaId the tela id
   * @param returnViewName the return view name
   * @param isSelect the is select
   * @return the model and view
   */
  protected ModelAndView telaEditMAV(
      Integer telaId, String returnViewName, Boolean isSelect, HttpServletRequest request) {
    ModelAndView modelAndView = new ModelAndView(returnViewName);

    try {

      if (isSelect) {
        modelAndView = listSelectBusiness(modelAndView, request);
      }
      if (!ValidationUtil.isNullOrZero(telaId)) {

        modelAndView.addObject(
            RESPONSE, getMapper().writeValueAsString(fetchTelaById(new FetchByIdRequest(telaId))));

        return modelAndView;
      }

    } catch (Exception e) {
      if (LOG.isErrorEnabled()) {
        LOG.error(CONTROLLER_EXCEPTION_MSG, e);
        modelAndView.addObject(RESPONSE, null);
      }
    }

    return modelAndView;
  }
コード例 #2
0
 private void validateCidadeId(List<MessageInfo> list, Cidade bundle) {
   ValidationUtil.isNullOrZero(bundle.getId(), SYSMGMT_BASE_BUNDLEVALIDATOR_ID_REQUIRED, list);
 }