public void save(DocumentHTML document, HttpServletRequest request, HttpServletResponse response) throws Exception { FluxoDTO fluxoDto = (FluxoDTO) document.getBean(); if (fluxoDto.getIdFluxo() == null || fluxoDto.getIdFluxo().intValue() == 0) { getFluxoService().create(fluxoDto); } else { getFluxoService().update(fluxoDto); } document.alert("Registro gravado com sucesso!"); HTMLForm form = document.getForm("form"); form.clear(); }