if (!msgs.isEmpty()) {
saveErrors(request, msgs);
return mapping.findForward("error");
}
SubOrgaoCtrl subOrgaoCtrl = new SubOrgaoCtrl(getDaoFactory());
try {
if (id != null && id.trim().length() > 0) {
subOrgaoCtrl.update(getOrgao(request), id, descricao,
inicioVigencia, fimVigencia);
msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
"message.atualizarSubOrgao.alterar"));
} else {
subOrgaoCtrl.insert(getOrgao(request), descricao,
inicioVigencia, fimVigencia);
msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
"message.atualizarSubOrgao.incluir"));
}